New private names proposal
david-sarah at jacaranda.org
Wed Dec 22 22:01:39 PST 2010
On 2010-12-23 05:08, Brendan Eich wrote:
> On Dec 22, 2010, at 7:34 PM, David-Sarah Hopwood wrote:
>> As far as I can see, MarkM has not (at least, not on the wiki) proposed
>> any new syntax in this discussion that had not already been proposed in
>> one of Allen's proposals.
> Wrong again. Allen did not write the original strawman:names proposal.
Fine, one of Allen or Dave Herman and Sam Tobin-Hochstadt's proposals.
Mea culpa. Does it affect my argument at all? No.
> Follow that link and read http://wiki.ecmascript.org/doku.php?id=strawman:names#binding_private_names
> to see only examples using x.key, etc. -- no square brackets.
What does the lack of an example have to do with anything?
Read what it says: in the scope of 'private x',
"x is also bound as a plain variable to the Name value."
Combined with the previous example:
var name = new Name;
obj[name] = "secret";
print(obj[name]); // secret
it's clear that the square bracket syntax is valid in the scope of a
private declaration. That is what MarkM's desugaring faithfully emulates.
Perhaps that is not what the authors of the names proposal intended.
If so, how was MarkM supposed to know that?
> Mark's example predates private_names and so may have worked in the old
> names proposal,
It explicitly says that it does; there's no "may" here.
> but only via square brackets. Not via dot -- so again *not* "the
> same syntax" as what even strawman:names proposed.
That page doesn't explicitly spell out the desugaring of '.', but MarkM
did so later. There's clearly no conflict with the soft field semantics,
which is the important thing, anyway.
> Never mind the private names proposal that supersedes names -- not faulting
> Mark for lacking clairvoyance here -- I'm faulting you for twisting "the
> same syntax" from its obvious meaning of "all the same syntax" to
> "the subset that uses square brackets".
Only if you're determined to misinterpret it, can
be mistaken for a complete proposal of how to desugar the names syntax.
It is obviously a partial outline.
> You seem to have problem owning up to mistakes.
*I* have a problem owning up to mistakes?
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 292 bytes
Desc: OpenPGP digital signature
More information about the es-discuss