On Oct 31, 2011, at 7:37 PM, John J Barton wrote:
> On Mon, Oct 31, 2011 at 4:27 PM, Allen Wirfs-Brock
> <[email protected]> wrote:
>>
>
>> We have talked quite a bit about how we could support very simple expression
>> of prototypal inheritance...
>> We have recently taken to calling this pattern "object exemplars". It is
>> prototypal inheritance, almost exactly equivalent to what selfish does. If
>> we could all be satisfied with this there would be no need for the ongoing
>> debate.
>
> I could be satisfied, but I know you are not satisfied since you have
> offered the pattern at the top of the thread.
> ...
>
Actually, I would be quite satisfied with object exemplars as the primary
pattern for defining named abstractions over objects. The class pattern at the
head of the thread is put forward in a attempt to satisfy those who are
insisting on a class definition construct that fully supports all of the
really complex features of class abstractions that show up in other class-based
dynamic object-oriented languages (and additional new requirements) and also
fully supports the class pattern that is implicit in the ES built-ins. What I
am trying to show that those requirements could be satisfied based upon a
compositional pattern using just <| and .{ . My belief that such a
compositional solution is adequate and better than trying to define a very
complex class semantics that may prove to be defective in the long run.
>> Sometimes it sounds like what you are asking for is precisely what objects
>> exemplars provide. But other times you say you want "classical
>> inheritance". Which is it?
>
> This thread is about your interesting and provocative model for
> classical inheritance in the mode of JavaScript. I'm not advocating
> for classical inheritance. Rather, I'm advocating for 'simple
> classical inheritance' and if we can't have simple, let's not have
> classical.
It actually sounds like you are advocating for prototypal inheritance that is
as simple to use as simple uses of classical inheritance in some languages. I
totally agree.
>
> What I don't want is a "classical" inheritance syntax that perpetuates
> the confusing "new F()/F.prototype" paradigm and also seems more
> complex than a Java-like solution.
I agree. Except that I am fine with expert using those technique if them find
them appropriate and also having them available to framework and transpiler
authors.
Allen
>
> jjb
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss