new strawman: syntactic support for private names

Herby Vojčík herby at
Wed Aug 29 04:23:32 PDT 2012


Two things.

1. If keyword "private" is used for defining the private names (so it is 
already "used"), why not to use reserved word "public" to define unique 

2. As for protected scoping issues (though I do not like it, since it 
makes classes more heavy by looking for @protectedBindings), I would 
vote for the last proposal, that is, explicitly "import" protected name 
into class' scope. But the "if there is an inherited, use it, otherwise 
create new" is tricky, your example shows why: you call super. at validate 
there. If there wasn't any super @validate, the code breaks.

So for this case, I'd propose not only "protected @foo;" as a means of 
"use inherited, if none, create your own", but also "protected super 
@foo;" (or even only "super @foo;", eventually making "super @foo;" 
silently assume "protected " before itself) as a means of "use 
inherited, if none, fail".


Allen Wirfs-Brock wrote:
> The strawman is at
> Allen
> ------------------------------------------------------------------------
> _______________________________________________
> es-discuss mailing list
> es-discuss at

More information about the es-discuss mailing list