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.
Aleph.js – Fullstack Framework in Deno
41–50 of 54 posts
Re: Aleph.js – Fullstack Framework in Deno
#42Earlier 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?
Re: Aleph.js – Fullstack Framework in Deno
#43Earlier 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.
Re: Aleph.js – Fullstack Framework in Deno
#44Earlier 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.
(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
#45Earlier 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.
Re: Aleph.js – Fullstack Framework in Deno
#46Re: Aleph.js – Fullstack Framework in Deno
#47Earlier 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.
Re: Aleph.js – Fullstack Framework in Deno
#48Earlier 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)
Re: Aleph.js – Fullstack Framework in Deno
#49Earlier 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)
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.
Re: Aleph.js – Fullstack Framework in Deno
#50Earlier 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…