Es4-discuss Digest, Vol 3, Issue 2
brendan at mozilla.org
Wed May 2 12:42:05 PDT 2007
On May 2, 2007, at 12:37 PM, Kris Zyp wrote:
> I for one would love to see the ability to set DontEnum on
> properties. This is a very logical thing do with some properties
> and is very useful in code interopibility even when you are not
> trying to achieve a pure "Hash". It doesn't seem like a very big
> addition either (vs sharps).
Everyone has read http://developer.mozilla.org/es4/proposals/
enumerability.html by now, right?
> Also, having function/methods as slots that can be swapped with
> values seems like a fundamental concept of ES and its simplicity
> and consistency. It would seem bizarre to me to set toString to a
> primitive and expect anything but an error when coercion tried to
> convert the object to string. ES3 throws an error, and it seems
> totally logical that it should.
> Also, it seems weird that we use the term "Hash", isn't Map or
> Dictionary more correct? Isn't a Hash just the most natural and
> efficient implementation of a Map or Dictionary? Maybe I am just
> used to Java terminology. Of course we know what each other is
> talking about, so it is not really a big deal.
Hash is just shorter, and conventional among Perl and (I think)
Python and probably Ruby folks. We wouldn't necessarily use it; the
late-breaking attempt to add a class with no helpful syntax (the
attempt that foundered in part on concern about weak reference
support being implied) was called Dictionary.
(Wow, I didn't know anyone read the digest.)
More information about the Es4-discuss