Minimalist Classes

Dmitry Soshnikov dmitry.soshnikov at gmail.com
Tue Nov 1 13:14:04 PDT 2011


On 01.11.2011 23:55, Brendan Eich wrote:
> 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.
>

Don't be worry ;) Once again, it wasn't proposed as "let's standardize 
it". It was just an example to show that the problem isn't so hard as 
described (well, for a library). It's just a library, but the working 
library. ... in most simple cases.

Dmitry.

> 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