strawman:names

# Peter Michaux (16 years ago)

The strawman:names wiki page

strawman:names

starts with

"It is not possible to create hidden properties in an object when property names can only be strings."

Why can't a string-named property be private? I understand they aren't now but why couldn't the "private" keyword make a string-named property private?


At the bottom of the same page

"Should we allow new Name('blah') for better printed representation? (Similar to (gensym 'blah) in Scheme)"

If there is "a new Name constructor" as mentioned higher in the wiki page, then why wouldn't "new Name('blah')" be allowed?

Since (gensym) returns a symbol, the above quotation makes it seem that the proposed Name objects are like Scheme symbols, correct? If this is the case, why not just call them Symbol objects? There is precedence for "symbol" in many languages and "symbol" is far less overloaded in the programming world than "name".

Peter

# Kris Zyp (16 years ago)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

+1, I think this was one of the most valuable features from ES4. Kris

Peter Michaux wrote:

The strawman:names wiki page

strawman:names

starts with

"It is not possible to create hidden properties in an object when property names can only be strings."

Why can't a string-named property be private? I understand they aren't now but why couldn't the "private" keyword make a string-named property private?


At the bottom of the same page

"Should we allow new Name('blah') for better printed representation? (Similar to (gensym 'blah) in Scheme)"

If there is "a new Name constructor" as mentioned higher in the wiki page, then why wouldn't "new Name('blah')" be allowed?

Since (gensym) returns a symbol, the above quotation makes it seem that the proposed Name objects are like Scheme symbols, correct? If this is the case, why not just call them Symbol objects? There is precedence for "symbol" in many languages and "symbol" is far less overloaded in the programming world than "name".

Peter


Es-discuss mailing list Es-discuss at mozilla.org, mail.mozilla.org/listinfo/es-discuss


Kris Zyp SitePen (503) 806-1841 sitepen.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - enigmail.mozdev.org

iEYEARECAAYFAkkkbQAACgkQ9VpNnHc4zAxiCwCdEkxxtaZ4S0cc9Fp/dR/tT+nj QVoAn0owxy9CdQP/S2y0VNZ4DsBwGmiy =NQs+ -----END PGP SIGNATURE-----

# Kris Zyp (16 years ago)

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Arg, I responded to wrong email :/, I meant to reply to the one on catchalls, that is the one I think is a very valuable feature. Kris