Separating a Hash type from Object
alex at dojotoolkit.org
Mon Apr 30 12:20:17 PDT 2007
On Monday 30 April 2007 11:59 am, Brad Fults wrote:
> As has been previously noted  and should be general knowledge, the
> confusion and collision between Object-as-hash and
> Object-as-inherited-from is sometimes painful in ES3.
> I looked through the latest ES4 spec and proposals  but didn't see
> anything about changing the way hashes are handled. Are there any
> plans to derive a Hash type from Object which would handle what are
> now object literals (as hash literals)? If not, can there be?
There has been a proposal regarding this:
ISTM that exposing ES3's internal [DontEnum] to user-set properties
fixes the issue without removing the (useful) flexibility of the
> This would solve many of the contemporary problems with Object (like
> extending Object.prototype to include methods like .keys(),
> .values(), etc.). I'm interested to hear others' thoughts on this.
Idiomatic ES3 code uses the object/hash duality to good effect. It's one
of the things I miss most when returning to a language without it
alex at sitepen.com A99F 8785 F491 D5FD 04D7 ACD9 4158 FFDF 2894 6876
alex at dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 186 bytes
Desc: not available
Url : http://mail.mozilla.org/pipermail/es-discuss/attachments/20070430/7c1812d2/attachment-0002.bin
More information about the Es4-discuss