Re: Object.entries in 2015

2015-04-14 Thread Leon Arnott
The Map constructor takes an iterable of [key, value] pairs. Array.from takes an iterable of elements.This asymmetry is presumably because the Array constructor's behaviour is already defined. A hypothetical Map.from would merely be the same as the Map constructor! Not quite true: Array.from,

Re: Object.entries in 2015

2015-04-14 Thread Jordan Harband
The other motivation might be subclasses - MyArray.from creates a MyArray, MyMap.from would create a MyMap. On Tue, Apr 14, 2015 at 2:03 AM, Leon Arnott leonarn...@gmail.com wrote: The Map constructor takes an iterable of [key, value] pairs. Array.from takes an iterable of elements.This

ModuleSpecifier: include .js or not?

2015-04-14 Thread Axel Rauschmayer
In Node.js you can either mention the file extension .js or omit it when you require a module. Which one is preferred for ES6 ModuleSpecifiers? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list

Re: ModuleSpecifier: include .js or not?

2015-04-14 Thread Wes Garland
Some food for thought from a non-standard use-case. In GPSEE, we can require(module) - but we support both modules written in JavaScript, and modules written in C (technically, any compiled binary with the correct C API), or both. We dlload(module.so) (if present), then interpret module.js (if