Live data from Hacker News

Aleph.js – Fullstack Framework in Deno

github.com

41–50 of 54 posts

Re: Aleph.js – Fullstack Framework in Deno

#41
post #25
post #17

Earlier quoted context omitted.

It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time)

Most languages intentionally avoid checking types at runtime except in specific situations where it's required (e.g. explicit typeof checks.) You do not want run time type checking on every variable access.

PHP has entered the chat.

Re: Aleph.js – Fullstack Framework in Deno

#42
post #17

Earlier quoted context omitted.

It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time)

> It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time) Java strips type info and runs it as JVM byte codes. There's no native Java runtime, AFAIK(it doesn't enforce types at runtime, only at build time). What's the problem?

Just because something has been done before doesn't mean that it's a good thing.

Re: Aleph.js – Fullstack Framework in Deno

#43
post #39

Earlier quoted context omitted.

How many years before a language is mature enough that it's not to be expected? I'm thinking 5 years is starting to push it, but others may have other opinions. on edit: when saying push it I mean sort of still reasonable, but maybe a bit troubling? 7 years would definitely feel like too much to me. I wonder if there are any studies.

Deno 1.0 is actually only 2 years and not 5 years.

Ok, but obviously when I say 5 years I mean from the start of development of the language not from when it is given 1.0 status. Is it your contention that the count to 5 years should start from when language creators say it is at 1.0 - if so I think 5 years is way over the line for when people should be saying they are rewriting projects written in it from the bottom up periodically.

Re: Aleph.js – Fullstack Framework in Deno

#44
post #17

Earlier quoted context omitted.

It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time)

Im not sure why are you down voted, because your statement isn’t wrong, I’m not sure of Deno internals, but what GP said is also true, AFAIK is similar to run your TS app with ts-node but without the need to add a dependency, so it means that you just execute `deno run index.ts` and it worke, I’m not 100% sure but I think is also works with tsx/jsx files.

While the comment is technically accurate, it's:

(a) worded as a contradiction to the parent comment but isn't (it just talks about something unrelated - runtime typechecks). Deno does run typescript code out of the box, typechecks aside.

(b) the technical accuracy isn't particularly significant/relevant since in practice Deno has a simple switch to check types on run (though I'm not sure why you would want to do that outside of a development environment: Typescript is a static tool & doesn't have any dynamic capabilities that would change results based on runtime environment).

Re: Aleph.js – Fullstack Framework in Deno

#45
post #42

Earlier quoted context omitted.

> It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time) Java strips type info and runs it as JVM byte codes. There's no native Java runtime, AFAIK(it doesn't enforce types at runtime, only at build time). What's the problem?

Just because something has been done before doesn't mean that it's a good thing.

I agree what you're saying, but they were talking about Python and TypeScript - it doesn't make sense to bring up type erasure in this context.

Re: Aleph.js – Fullstack Framework in Deno

#47
post #22

Earlier quoted context omitted.

You do realize deno is based on the V8 JavaScript Engine and there isn't such thing as a typescript runtime even by Microsoft the developers of typescript? https://en.wikipedia.org/wiki/TypeScript

Deno used to run the type checker with the `run` command, but now you need to pass a flag to run the type checker.

This is different from what the GP is asking about, though

Re: Aleph.js – Fullstack Framework in Deno

#48
post #17

Earlier quoted context omitted.

It is. Deno runs TypeScript out of the box.

It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time)

You probably don’t want that throughout your entire codebase. It’s a lot of overhead. Where you do want it (at API/user input/network etc boundaries), you can use something like Zod[1] or similar to define your type guards and then infer the static types from there.

1: https://github.com/colinhacks/zod

Re: Aleph.js – Fullstack Framework in Deno

#49
post #17

Earlier quoted context omitted.

It is. Deno runs TypeScript out of the box.

It strips type info and runs it as Javascript, though. There's no native typescript runtime, AFAIK (it doesn't enforce types at runtime, only at build time)

> There's no native typescript runtime.

A proposal was actually floated recently to grandfather in TypeScript-like annotations[1]. It would be ignored by the runtime and treated purely as a comment, and would be optional. This is what native runtime support for TypeScript would look like. Not sure if it will ever gain official support in the language though.

> it doesn't enforce types at runtime, only at build time

Runtime type "enforcement" is just your program breaking, for example "undefined is not a function". Well, I guess it isn't so simple, because JS does a lot of implicit type translation behind the scenes, like helpfully converting "123" to 123. It would be possible to "enforce" types at runtime by turning off that language feature in certain situations, but I don't think it will happen, for back-compat reasons.

[1] https://github.com/tc39/proposal-type-annotations

Re: Aleph.js – Fullstack Framework in Deno

#50
post #7
post #5

Earlier quoted context omitted.

Well deno is about five years old. That is to be expected, isn't it ? The timing feel similar to rust to me. It needed almost a decade to have real production ready project. Mozilla was an exception as they built it.

Maybe I'm spoiled, which I'm willing to consider being true. However, one could assume that projects at this stage would use versioning, pinning, and documenting the changes to the api, which obviate the need for these types of disclaimers. All caps disclaimers like this could discourage those who are otherwise capable from giving it a shot. Im not saying this is deno's fault, maybe it is and maybe it isn't, I'm only…

I think if you look at Angular as an example, the Aleph team is doing it right. Angular didn't just make breaking changes when they went 2.0, they basically abandoned everything about 1.x and released something completely new. There were definitely people who had just learned Angular 1 that found out their time was poorly spent.
Post reply on HN