ES6 Maps are now on by default in Chrome 38
programming.com
ES6 Maps are now on by default in Chrome 38
1–10 of 54 posts
Re: ES6 Maps are now on by default in Chrome 38
#2[deleted]
Re: ES6 Maps are now on by default in Chrome 38
#3Goodbye object literals too, apparently.
Re: ES6 Maps are now on by default in Chrome 38
#4That looks like a cumbersome way to define a map, like small arrays within arrays.
Re: ES6 Maps are now on by default in Chrome 38
#5Goodbye object literals too, apparently.
I can potentially imagine a helper function like `mapFromObject`, but yeah I agree with you. That syntax is disheartening. Enough to make me want to keep using `hasOwnProperty`.
Re: ES6 Maps are now on by default in Chrome 38
#6Practically a net neutral time saved in typing at the cost of readability of the object literal. I don't think there will be many cases where I'll be using Map over an Object literal.
Re: ES6 Maps are now on by default in Chrome 38
#7Re: ES6 Maps are now on by default in Chrome 38
#8That looks like a cumbersome way to define a map, like small arrays within arrays.
Hummm
My bet is that the Map() is turning an array of arrays into a map. And that in the future it will convert the original syntax into a Map as well
Re: ES6 Maps are now on by default in Chrome 38
#9Practically a net neutral time saved in typing at the cost of readability of the object literal. I don't think there will be many cases where I'll be using Map over an Object literal.
Maybe you can monkey patch Object.prototype to include a toMap function? That way you get nice literals and the benefits of maps.
Re: ES6 Maps are now on by default in Chrome 38
#10Of course you could already use prototype-less objects as maps (Object.create(null))