Erik Arvidsson wrote:
let object = ...
{
   let key = Name.create()
   let secret = {}
   object.@key = secret
}

Oh, so all that foo.@bar does is to have different syntax for foo[bar], bar being private name? Than it's not as cool as I thought at all.

private keyword in class proposal did something a lot more convenient. It created private name behind the scenes and let people to use "private" properties with doing
  prvKeyA = Name.create();
  prvKeyB = Name.create();
  ...
for all private keys they wanted to use. This was _the_ purpose of private keyword.

It seems I was overjoyed prematurely... :-/

Herby

P.S.: Why not to let obj[privateName]? It is fine.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to