From: John G Harris on
On Fri, 5 Mar 2010 at 12:52:20, in comp.lang.javascript, Dmitry A.
Soshnikov wrote:
>On Mar 5, 10:21�pm, John G Harris <j...(a)nospam.demon.co.uk> wrote:

<snip>
>> 2
>> In the "General Provisions" section, "Prototype based model of OOP"
>> should be "ECMAScript based model of OOP". Traditional prototype-based
>> languages aren't like ECMAScript.
>>
>
>What exactly do you mean? First part of this chapter mostly devoted to
>general theory with describing prototype-based model in general - with
>two kinds: delegation based prototyping which is used in ECMAScript
>and concatenative prototyping - just to mention that such kind of
>prototyping also is. As examples I use pseudo-code with describing
>delegation-based prototyping. What kind of (traditional) prototyping
>do you mean?

To me a traditional prototype based language is one where new objects
are created by cloning another object. The object cloned from is the
'prototype' of that kind of object. The author of the Wikipedia article
on prototype based languages thinks the same.

This isn't how it works in ECMAScript where cloning is not very easy.

John
--
John Harris
From: Dmitry A. Soshnikov on
On Mar 7, 8:39 pm, John G Harris <j...(a)nospam.demon.co.uk> wrote:
> On Fri, 5 Mar 2010 at 12:52:20, in comp.lang.javascript, Dmitry A.
>
> Soshnikov wrote:
> >On Mar 5, 10:21 pm, John G Harris <j...(a)nospam.demon.co.uk> wrote:
>
>   <snip>
>
> >> 2
> >> In the "General Provisions" section, "Prototype based model of OOP"
> >> should be "ECMAScript based model of OOP". Traditional prototype-based
> >> languages aren't like ECMAScript.
>
> >What exactly do you mean? First part of this chapter mostly devoted to
> >general theory with describing prototype-based model in general - with
> >two kinds: delegation based prototyping which is used in ECMAScript
> >and concatenative prototyping - just to mention that such kind of
> >prototyping also is. As examples I use pseudo-code with describing
> >delegation-based prototyping. What kind of (traditional) prototyping
> >do you mean?
>
> To me a traditional prototype based language is one where new objects
> are created by cloning another object. The object cloned from is the
> 'prototype' of that kind of object. The author of the Wikipedia article
> on prototype based languages thinks the same.
>
> This isn't how it works in ECMAScript where cloning is not very easy.
>

Yes, that's right. But that's not about author from Wikipedia, it's
about the general theory. And both kinds of prototyping I mentioned:

(a) concatenative - when a prototype object is a original copy from
which other objects are cloned;

(b) delegation based - when a prototype object is an object to which
properties delegate other objects in case of absence such own
properties.

But the title "ECMAScript based model of OOP" doesn't fit, because
that ECMAScript which uses delegation based model (and it was invented
before the ECMAScript) but not vice versa. So the section is named
generally "Prototype based ..." in which concatenative and delegation
based models considerate.

Dmitry.