Hacker News new | ask | show | jobs
by khgvljhkb 3845 days ago
Javascript sure got more features, but how many should Crockford add to "the good parts"? If you ask me, only generators.
4 comments

Typed arrays, weak Maps, weak Sets, and let/const.

Now what I really wish to see in JavaScript are real Immutable Objects. Like, any variable declared with const makes that Object Immutable, not just preventing it from being reassigned. That, imo, would take JS to the next level. That and something like TypeScript/flow built in to native JS. It's do-able, and I see it happening way down the line, maybe es8/9 haha....

Object.freeze?
Arrow functions that don't rebind this would also be on the list for me, as would be block-scoped variables.
According to this recent talk, not many, and he would even take away features from The Good Parts:

The Better Parts by Douglas Crockford: https://youtu.be/Ji6NHEnNHcA

constants, string templates, async/await, decorators