class sugar: static inheritance

Brendan Eich brendan at
Wed Jun 8 09:55:21 PDT 2011

On Jun 8, 2011, at 8:50 AM, Mark S. Miller wrote:

> On Wed, Jun 8, 2011 at 8:27 AM, Brendan Eich <brendan at> wrote:
>> Btw, in both C++ and Java, the semantics of "protected" is a mess, in different ways.
> Sure. Let's not make those mistakes. Non-fixable in your view?
> Not necessary in my view. There are all sorts of old constructs that address needs that turn out to be rare. Again, I've encountered an actual need for this only rarely, and only a mild need. As many people have said, language design largely consists of deciding to leave things out[1]. We should do more of that ;).

We can definitely leave protected out. My "seems inevitable" was in response to Kam bringing it up via a question that I expect will be frequently asked.

In C++ protected is used quite a bit, judging from Mozilla's codebase. But I see fewer uses in WebKit, so there may be some old inline avoidance (prehistoric C++ compiler issues) at work in the Mozilla case.

> Many of the things we pulled from classes to make it simple enough to get accepted -- "requires"/"abstract", traits, earlier error checking, coupling to trademarks[2] -- are all more compelling that "protected".

Right, I'm not proposing adding protected, just discussing, doing A to Kam's Q ;-).

> [1] Who said that first?

Niklaus Wirth, IIRC.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list