On May 15, 2011, at 11:53 PM, Erik Corry wrote: > 2011/5/16 Brendan Eich <[email protected]>: >> This is a good point too. Not sure we've considered a value -> value map >> carefully yet. > > A value->anything map is pretty easy to do with a normal JS object. > > function get(value) { > if (typeof(value) == 'number') return this["NUM" + value]; > if (typeof(value) == 'string') return this["STR" + value]; > ... > }
Where's the 'object' case (excluding null)? > Weakness makes no sense in this case since a value can never really be lost. Weakness is still necessary for an object key if you want to avoid leaks and you don't need to enumerate. /be _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

