4 ms·
I 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 comin
by cphoover 5y ago
I 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?
- cphoover 5y agoScala is a perfect example of an overly complex bloated mess with so many foot-guns I can't even begin to count them. EDIT: I never said JS shouldn't evolve! JavaScript has evolved a ton! From better handling of asynchronous control-flow with promises and then async/await, to destructing, spreads, constant assignments, Map/Set objects, a number of other improvements I can't even begin to list. But none of these changes fundamentally changed JavaScript from being a dynamic weakly typed language.
- halfmatthalfcat 5y agoI actually write a lot of Scala and beg to differ. The chances for bad developers to write bad code in Scala are higher than most other languages but what you might call foot-guns are actually elegant ways at solving complex problems. A lot of these "problems" (implicits, enums, etc) were solved with Scala 3 too. Another example of a language evolving and becoming better based on community feedback and thoughtful iteration.
- danielvaughn 5y agoI'm on the fence about this one. On the one hand I would love strong typing in JS. But the reason I never adopted TS is because one time I spent months converting Coffeescript back into JS once it fell out of favor. This was back when a bunch of Ruby developers decided that JS should look like Ruby. If I'm writing Javascript, I'm writing Javascript, not something that pretends to be something else.
- Bilal_io 5y agoThe good news is that you can take your time with it, only start using typescript in new files while converting older ones slowly. And even if you never do that, typescript tooling provides hints and autocompletion to vanilla J's files as well.
- vosper 5y agoYou can convert TS to JS at the drop of a hat. This is part of what’s required to get it to run a browser, which doesn’t understand native TS. It’s different to Coffeescript which was different syntax for JS. TS is additional, type-specific syntax but you are still writing JS. I ran a team that had to maintain a large Coffee codebase, that we could never get the resources to move off. So I know that pain. TS is different, both in how it works and the level of adoption. Coffeescript was always niche, and some benefits were there but they weren’t game-changing for (eg) writing correct code or maintaining large codebases.
- recursive 5y agoYou can generally migrate out of TS very easily if it was the wrong choice. You can mostly use the compiler output as a drop-in replacement for your source code. Depending on compiler options, it's quite readable.
- neurotrace 5y agoOne of the benefits of TypeScript is that it literally is just JavaScript plus some. You can literally run `tsc` and it will spit out JavaScript written the same way as you wrote it but without any of the types. The only things that might look out of place is things like enums or decorators but you can choose not to use them.
- madeofpalk 5y ago> but they did not change the fundamental characteristics of the language. FWIW, this proposal does not change the fundamental characteristics of javascript. It just adds a new comment syntax.
- cphoover 5y agoThere is no way this is where the buck stops... after comment syntax people will look at compiler optimizations. It will change the language.
- zachrip 5y agoI would like to say that I have written js for a long time as well and I love it; but the thing that keeps me around nowadays is typescript. I would need to be paid much more to work on a non-ts js codebase nowadays.