5 ms·
I mean, with all due respect, who are you to decide what Javascript is and is not? There's obviously a huge demand for type safety in Javascript, hence the exis
by halfmatthalfcat 5y ago
I mean, with all due respect, who are you to decide what Javascript is and is not? There's obviously a huge demand for type safety in Javascript, hence the existence and adoption of Typescript.
- Turing_Machine 5y agoCompare the lines of code (on Github, say) written in straight Javascript and the lines of code written in Typescript. I do not think the demand is quite as huge as you think it is.
- rattlesnakedave 5y agoI'm not sure that's a useful metric.
- Aldo_MX 5y agoThis is like saying compare the lines using generators or proxies vs the lines using type annotations. Just because a feature is not widely adopted it doesn't mean that is not useful to the people using it, especially when the feature is used to mitigate the entire "cannot find property of undefined" type of errors.
- latortuga 5y agoIn 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.
- neurotrace 5y ago> 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.
- Turing_Machine 5y ago> This changes literally nothing about the JS language. Besides adding a bunch of new syntax, of which JS already has far too much.
- Turing_Machine 5y ago> Just because a feature is not widely adopted it doesn't mean that is not useful to the people using it But it does mean there likely isn't a "huge demand", which was the original claim. You're attempting to move the goalposts here.
- moron4hire 5y agoEvery TypeScript project is going to have at least an equivalent amount of JavaScript code sitting in the repo from the output of the TypeScript compiler.
- cphoover 5y agomost people don't version control the output of their compiled build though.
- cphoover 5y agoI don't know but I've been using JavaScript for a while now. It seems like a lot of the people that want JavaScript to look similar to other languages are coming from different programming fields, and want JavaScript to look more like their language of choice. Most of the changes to JS in the last 20 years, have been serious improvements, but they did not change the fundamental characteristics of the language. Believe it or not there are a lot of people that like JavaScript!
- Aldo_MX 5y ago> but I've been using JavaScript for close to 20 years now How dare you use JavaScript for anything else than validating forms!!! What is that jQuery thing??? Stop trying to make JavaScript into something it's not!!!
- halfmatthalfcat 5y agoAnd most of the developments in Java, since 1.8, have been taking ideas from other languages (primarily Scala) to make the language better. Why is it ok for other languages to evolve but not Javascript?
- 5y ago
- kyberias 5y agoBut didn't he merely express his opinion about this?
- halfmatthalfcat 5y agoI'm questioning their opinion, as we do on this site.
- kyberias 5y agoYou asked: "who are you to decide?". That's not questioning their opinion but rather their right to voice their opinion.