Do Maximally Minimal classes carry their weight?

Brendan Eich brendan at mozilla.org
Sun Apr 1 08:49:50 PDT 2012


Allen Wirfs-Brock wrote:
> However, when we add private as a ClassElement we have crossed the line to having things other PropertyMethodDefinition in ClassBody. If this opens the flood gates for every over possible addition we will be back in the swamp.

I like your message, except for this metaphor. We're in charge of the 
syntax. It's not an overflowing river surging against our gates. We can 
say "no" and do. I think we've just gone a little too far, without 
explicit and rationalized "no" so much as preemptive minimization to get 
consensus.

My favorite trope is the game of Jenga. We must not stack too high. But 
some pieces really need other pieces under or next to them. "private x" 
is one such affordance, and we've heard already that if ES6 requires

   const px = Name.create(), py = Name.create(), pz = Name.create();

we'll have failed to make private names usable in some contexts -- 
definitely in classes (assuming classes make it), IMHO.

/be


More information about the es-discuss mailing list