On Fri, Apr 4, 2008 at 1:45 PM, Lars Hansen <[EMAIL PROTECTED]> wrote: > > That could be true. But it could also be the case that people > find that it is easier to say > > var x = ... > var y = ... > var n = "x" // but could be y > > ... > // n may change here by assigning another string to it > ... > eval(n) > > than > > var x = ... > var y = ... > var n = function () { return x } // but could be y > > ... > // n may change here by assigning another function to it > ... > n()
Like I wrote in previous messages, what these programmers need is an actual data structure: var m = { x: ..., y: ... }; var n = "x"; // n may change, &c. ... m[n] > > (and the latter does not handle shadowing, for better or worse). Heh. Someone should revive Mark Miller. -Jon _______________________________________________ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss