Separating a Hash type from Object
Andrew Dupont
andrew at andrewdupont.net
Tue May 1 22:14:49 PDT 2007
Brendan Eich wrote:
> I'm confused -- do you intend that foo#.toString name a property in
> no namespace with identifier 'toString' in some object, or a property
> in a hidden namespace with local name 'toString'?
>
The latter was my interpretation. But you're saying that the #. operator
would simply look at the subset of an object's properties that are
defined on the instance?
That's more reasonable than creating a whole new property namespace. It
doesn't solve the string coercion problem, though. Combining the #.
operator with "use namespace intrinsic;" would, but that means the
developer would have to *opt into* key safety.
I still think the idea is promising, though, and would be useful even
with this drawback -- and far more practical than what I originally
thought you meant.
Cheers,
Andrew
More information about the Es4-discuss
mailing list