News for hackers. Stuff that matters.
Re:First look: adding type annotations to JavaScript by latortuga on Thursday March 10, 2022 @10:12AM (#30627769)
In the linked article, the author spends 1 sentence dealing with objections:

> I can understand if JavaScript developers are afraid of TypeScript taking over their language. However, this proposal will be as far as things will go w.r.t. adding TypeScript features to JavaScript

And in the next few sections it includes someone who wants to build on the proposal including using type hints to optimize code. I just think there's literally no way to guarantee that "this will be as far as things will go". Yes languages evolve and add new things all the time. But GP's point is that the language seems to be going toward what people want it to be coming from other languages.

I agree, stop trying to make JS something it's not.

Re:First look: adding type annotations to JavaScript by neurotrace on Thursday March 10, 2022 @12:05PM (#30629267)
> And in the next few sections it includes someone who wants to build on the proposal including using type hints to optimize code.

This changes literally nothing about the JS language. JS engines already attempt to determine the types of things to optimize the code they generate. Type annotations would just allow them to make more aggressive optimizations.

Re:First look: adding type annotations to JavaScript by Turing_Machine on Friday March 11, 2022 @04:08PM (#30646040)
> This changes literally nothing about the JS language.

Besides adding a bunch of new syntax, of which JS already has far too much.