From: Jorge on
On Jan 13, 9:14 am, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
wrote:
> Jorge wrote:
> > Thomas 'PointedEars' Lahn wrote:
> >> IBTD.  A user-defined `constructor' property of the prototype of an
> >> object can be most useful.  One basic principle of OOP is polymorphism,
> >> and one method of achieving that is overloading; that is, a method is
> >> defined on an object that is also defined on a superordinate object (in
> >> class-based OOP: the superclass; in prototype-based OOP: the next object
> >> in the prototype chain). (...)
>
> > The need to access a superclass in order to achieve polymorphism is
> > ~non-inexistent, for in a weakly typed language such as JS a single
> > method is usually enough -> there's no need to overload anything, nor
> > access a superclass.
>
> A need that you are unable to perceive is still a need.  I am using this
> pattern to my advantage, with the exception...

....that it has nothing to do with polymorphism.

> of the use of the word
> "superclass" (as there are no classes).

(loud applause)

> > And, in any case, in order for a method "method" of an instance "this"
> > to access its superclass' method "method", there's no need to use
> > neither "this.__proto__", nor this.constructor, nor
> > this.constructor.prototype, nor an "explicit constructor's
> > identifier".
>
> Then, pray tell, how would you call it then

Think again. (hint: you want to let the prototype chain do its thing)

> (ignoring in your favor again
> that there are no classes, and so no superclasses)?

(loud applause #2)
--
Jorge.
From: David Mark on
Jorge wrote:
> On Jan 13, 9:14 am, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
> wrote:
>> Jorge wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> IBTD. A user-defined `constructor' property of the prototype of an
>>>> object can be most useful. One basic principle of OOP is polymorphism,
>>>> and one method of achieving that is overloading; that is, a method is
>>>> defined on an object that is also defined on a superordinate object (in
>>>> class-based OOP: the superclass; in prototype-based OOP: the next object
>>>> in the prototype chain). (...)
>>> The need to access a superclass in order to achieve polymorphism is
>>> ~non-inexistent, for in a weakly typed language such as JS a single
>>> method is usually enough -> there's no need to overload anything, nor
>>> access a superclass.
>> A need that you are unable to perceive is still a need. I am using this
>> pattern to my advantage, with the exception...
>
> ...that it has nothing to do with polymorphism.
>
>> of the use of the word
>> "superclass" (as there are no classes).
>
> (loud applause)
>
>>> And, in any case, in order for a method "method" of an instance "this"
>>> to access its superclass' method "method", there's no need to use
>>> neither "this.__proto__", nor this.constructor, nor
>>> this.constructor.prototype, nor an "explicit constructor's
>>> identifier".
>> Then, pray tell, how would you call it then
>
> Think again. (hint: you want to let the prototype chain do its thing)
>

You are babbling again Jorge. This stuff is simple enough that you
either know it or you don't. It is clear that you do not.
From: Jorge on
On Jan 13, 10:08 am, David Mark <dmark.cins...(a)gmail.com> wrote:
> Jorge wrote:
> > On Jan 13, 9:14 am, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
> > wrote:
> >> Then, pray tell, how would you call it then
>
> > Think again. (hint: you want to let the prototype chain do its thing)
>
> You are babbling again Jorge.  This stuff is simple enough that you
> either know it or you don't.  It is clear that you do not.

(try to) think again.
--
Jorge.
From: David Mark on
Jorge wrote:
> On Jan 13, 10:08 am, David Mark <dmark.cins...(a)gmail.com> wrote:
>> Jorge wrote:
>>> On Jan 13, 9:14 am, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
>>> wrote:
>>>> Then, pray tell, how would you call it then
>>> Think again. (hint: you want to let the prototype chain do its thing)
>> You are babbling again Jorge. This stuff is simple enough that you
>> either know it or you don't. It is clear that you do not.
>
> (try to) think again.

It's not meant to be a brain-teaser, Jorge. You haven't really said
anything that makes sense. No matter how you call your "super-classes",
it's not going to be a revelation here. ;)
From: Jorge on
On Jan 13, 10:23 am, David Mark <dmark.cins...(a)gmail.com> wrote:
> (...) No matter how you call your "super-classes",
> it's not going to be a revelation here.  ;)

That's true, as it's in one of Crockford's videos and in at least one
msg in c.l.js.
--
Jorge.