Minimalist Classes
Brendan Eich
brendan at mozilla.com
Tue Nov 1 12:55:20 PDT 2011
On Nov 1, 2011, at 11:06 AM, Allen Wirfs-Brock wrote:
> On Nov 1, 2011, at 10:57 AM, Brendan Eich wrote:
>
>> On Nov 1, 2011, at 10:47 AM, Dmitry Soshnikov wrote:
>>
>>> The technique I showed of course initially is designed to be used with class-system; though, I think it can be adopted to class-free system as well.
>>
>> We're not going to delete and restore. That's a non-starter for performance and observable mutation reasons.
>
> the mutation is so wrong, and not just for performance reasons.
So wrong, don't get me started.
It's important to avoid non-starters that delete, but more than that, we have a pigeon-hole problem. You can't solve it using the heap and nested save-and-restore mutation. That's observable and it doesn't compose.
Back to minimal classes with super factored out nicely as Allen has done. I have a counter-proposal brewing.
/be
>
> Assume x is global constant reference to an obj and foo is a method of that object that does a super.foo call up through several levels of "superclass" foo methods.
>
> In that case the expression "x.foo()" when called from "somewhere else, such as from a top level expression", is going to do something different then what it does when called (either directly or indirectly) from a super invocation of one of the superclass foo methods. That can't be reasonable behavior.
>
> Allen
>
>
>
More information about the es-discuss
mailing list