by outworlder · 11y ago · 0 comments
But could you please fix the damn boolean logic? And while at it, get rid of most implicit conversions.
Or forget all those features and bake in a macro system, so that we can fix anything without having to wait for the next ES[N] standard to get adopted.
Last time I checked, !, && and || worked like they do in every other language.
> And while at it, get rid of most implicit conversions.
If you get rid of them JS ceases to be JS because all JS code ever written stops working, rendering the language about as useful as something I suddenly decide to create myself in 10 days.
Use TypeScript or similar if the implicit conversions bother you. You don't need to write JS directly.
> Or forget all those features and bake in a macro system, so that we can fix anything without having to wait for the next ES[N] standard to get adopted.
This was mentioned in the slides. Did you read them?
Brendan's talked about adding a macro system. I'm not sure if a macro system could really let you redefine everything that's built in though...
edit: Sounds like I'm behind the times; found out about sweet.js (http://sweetjs.org/).
Actually "use strict" actually makes JS an almost good language as mistakes are immediately flagged rather than "working anyway." But strict mode doesn't go nearly far enough in my opinion.
I will say for backwards compatibility you're always going to have to write "===" the only thing a flag would do is break "==" on purpose.