7 ms·
Oh yeah, great, many new features. But could you please fix the damn boolean logic? And while at it, get rid of most implicit conversions. Or forget all those
by outworlder 12y ago
Oh yeah, great, many new features.
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.
- TazeTSchnitzel 12y ago> But could you please fix the damn boolean logic? 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?
- cozuya 12y agoDeprecating == is probably a good step. Or better yet just turning == into === and removing that. That would cause some chaos thats for sure...
- UnoriginalGuy 12y agoThey don't have to remove anything, just repeat what they did with "use strict" but make it, uhh, even stricter. Just a subset of JS which is only the good parts. 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.
- sjrd 12y agoIt seems "use strong" is for you. https://developers.google.com/v8/experiments https://developers.google.com/v8/experiments
- LittleDan 12y agoStrong mode prohibits most (all?) implicit conversions https://developers.google.com/v8/experiments https://developers.google.com/v8/experiments. 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/ http://sweetjs.org/).
- phpnode 12y agoMacros for JavaScript have been available for a long time[0], you can even use the C preprocessor[1]. Also I wrote a macro plugin for babel just yesterday [2] [0] http://sweetjs.org/ http://sweetjs.org/ [1] http://www.nongnu.org/espresso/js-cpp.html http://www.nongnu.org/espresso/js-cpp.html [2] https://github.com/codemix/babel-plugin-macros https://github.com/codemix/babel-plugin-macros