I actually think that people should rather use EcmaScript name instead of JavaScript, because it's a way better name (much less confusing, given that this lang doesn't have anything to do with Java anyway). I wish Oracle started suing people to force everyone to use the better name.
I am going to sound crazy, but, if Microsoft would free up TypeScript and every browser added native TypeScript features to JavaScript… and then we all just started calling it TypeScript. Maybe? Then you would see native ts files. Oracle will never give up JS. The funny thing is the number of people who confuse Java and JS.
It’s time to free JavaScript (2024)
301–310 of 393 posts
Re: It’s time to free JavaScript (2024)
#302Earlier quoted context omitted.
So? If supported natively by the browser the browser could compile it on download. You'll still get all the strong typing without have to wait for it to run. For example an error in a little used branch would cause an error before the branch even runs.
So then the user gets a type error in their face instead of the page loading? That doesn't really sound better than the developer getting that error while writing the code, which is what TypeScript currently does.
The alternative is not "User sees no error", it's "user sees the error at runtime".
In which case, yeah, having the user see the type error is vastly preferable to having the user see a runtime JS error.
Re: It’s time to free JavaScript (2024)
#303Earlier quoted context omitted.
For years we said bring something sane to browsers instead of trying to salvage js. At this point, though, why don't they just implement DOM bindings in wasm and make internets a better place overnight?
TypeScript is a really decent language though, I wouldn't feel happier or more productive using Fortran or whatever. Its type system is actually really powerful which is what matters when it comes to avoiding bugs, and it's easy to write functional code with correct-by-construction data. If you need some super optimized code then sure that's what WASM is for but that's not the problem with most web apps, the usual pr…
It is really powerful as compared to Javascript. It is even really powerful as compared to most other languages people normally use. But not very powerful as compared to languages that have 'proper' type systems. Typescript still relies on you writing tests for everything.
The type system is a huge boon for the developer experience, of course. It enables things like automatic refactoring that make development much more pleasant (although LLMs are getting better at filling that void in dynamically typed languages). But it doesn't save you from bugs in a way that the tests you have to write anyway won't also save you from. And those same tests would also catch the same bugs in Javascript, so you're in the same place either way with respect to that.
Re: It’s time to free JavaScript (2024)
#304Re: It’s time to free JavaScript (2024)
#305Re: It’s time to free JavaScript (2024)
#306Re: It’s time to free JavaScript (2024)
#307The last time this was brought up, "WebScript" was mentioned as a possible alternative name. (Like WebAssembly, WebSockets, WebRTC, etc.) https://news.ycombinator.com/item?id=45297066
My personal favourite is "JayScript".
---
Re: It’s time to free JavaScript (2024)
#308The last time this was brought up, "WebScript" was mentioned as a possible alternative name. (Like WebAssembly, WebSockets, WebRTC, etc.) https://news.ycombinator.com/item?id=45297066