More musings: the current proposal allows this form where the generation
of the private name is explicit:
private x = new Name();
What if the silently generative form were not allowed? That would make
the mapping of identifiers more explicit.
And if so, could we replace = with a token that indicates mapping?
private x <=> new Name();
What about mapping public identifiers to other public identifiers?
private cos <=> "cosine" // Now I can write Math.cosine()
If that is allowed then the private keyword no longer makes sense.
How about something like the let statement:
var privateX = new Name(), privateY = new Name()
for (x,y) use (privateX, privateY) {
// Identifier mapping scoped to this block
}
Or flip the for and use clauses around if that looks too much like a loop:
use(new Name(), new Name()) for (x, y) {}
David
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss