Brendan Eich wrote:
Herby Vojčík <mailto:[email protected]>
January 20, 2012 10:39 AM
Brendan Eich wrote:
And again, we do not want a reified "private state object", so private
could not be a free expression. This also hurts private(other).weight --
'weight' is not an identifier in a "private state object", it has to be
a private name object binding. Therefore we should avoid any syntax
suggesting a first-class reflection of a private state object.
How do I do private(foo)[expression]? Or I don't (yes, it can be
worked around by foo.@store[expression], but)?
No problem -- @foo[bar] is the same in abstract syntax as (@foo)[bar].
No, I asked for something else. How do it do: "get a private property of
<<foo>> whose name is computed by <<expression>>"? Something like
foo.@[expr]? Or is there no way to do it?
In other words, what is [] syntax for foo.@bar? foo.@["bar"]? foo["@bar"]?
Herby
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss