Suggestion: Object.symbols

Alexander Jones alex at weej.com
Wed Jun 15 23:01:44 UTC 2016


Not in general, just for map-like usages, i.e. if you have an object where
the keys are not static, you probably would be better served by a map.

The problem with those functions you describe is that there are a
large combinatorial set of them - did you want configurable, own,
non-enumerable string-keyed properties? Map is both narrower in this sense
(a map item is JUST a key and value with no metadata), and wider in its
valid key types (no toString called!), which is more appropriate for many
problems.

Cheers

Alex

On Wednesday, 15 June 2016, doodad-js Admin <doodadjs at gmail.com> wrote:

> > I consider all of the 'get some arbitrary subset of properties from an
> object' use cases obsoleted by `Map`. But maybe I'm missing something
> obvious or not-so-obvious...?
>
>
>
> Objects, obsolete with Map ? “Map” is not meant to replace objects, is it ?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160616/216fde2a/attachment.html>


More information about the es-discuss mailing list