[dojo-contributors] dojo.lang.inherits

Scott J. Miles sjmiles at turbophp.com
Thu Apr 6 17:31:08 EDT 2006

First off, to rebut my comment with 'delegation is inheritance' is just kind
of funny. =P
My training is such that delegation refers to locating a method call
implementation at run-time on an object. The system of locating a particular
method through a prototype chain may be called delegation, but the process
of construcing a new object type by creating a new link in a prototype
chain, adding or overriding properties, and managing initialization is
something greater. 
If you wanted to rename dojo.event.connect to dojo.event.delegate, I would
say that is clearly correct. IMO, dojo.lang.inherits is JavaScript-style
If you want to call it cloneAndExtend or something, I can't argue, but it
seems like pedantry. 
Scott J. Miles
TurboAjax Group
HYPERLINK "http://www.turboajax.com"http://www.turboajax.com


From: dojo-contributors-bounces at dojotoolkit.org
[mailto:dojo-contributors-bounces at dojotoolkit.org] On Behalf Of Tom Trenka
Sent: Thursday, April 06, 2006 11:11 AM
To: dojo dev.
Subject: Re: [dojo-contributors] dojo.lang.inherits

What are you referring to, Sandro's link or JS?  Delegation *is* the
inheritance model in JS, that's what the prototype system implements...


On 4/6/06, Scott J. Miles <HYPERLINK
"mailto:sjmiles at turbophp.com"sjmiles at turbophp.com> wrote: 

IMO, what we have here is a type of mass delegation, potentially an entire
interface's worth. Additionally, where the new object does not contain a new
implementation of a method, it acquires the superclass method (or any 
property). Overall, I would say this is more generally an inheritence

Scott J. Miles
TurboAjax Group
HYPERLINK "http://www.turboajax.com"http://www.turboajax.com

-----Original Message----- 
"mailto:dojo-contributors-bounces at dojotoolkit.org"dojo-contributors-bounces@
"mailto:dojo-contributors-bounces at dojotoolkit.org"dojo-contributors-bounces@
dojotoolkit.org ] On Behalf Of Sandro Magi
Sent: Thursday, April 06, 2006 4:43 AM
To: dojo dev.
Subject: Re: [dojo-contributors] dojo.lang.inherits

+1 to delegate.

It's closer to the proper concept.


Alex Russell wrote:
> To address Jesse's point, how about a name like:
>       dojo.delegate(subclass, superclass, { ... });
> ?
> On Wednesday 05 April 2006 5:33 pm, Scott J. Miles wrote: 
>> dojo.defineClass(subclass, superclass, { constructor: ..., param1:
>> ..., func1: ... });
>> +1

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/302 - Release Date: 4/5/2006
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20060406/672136c7/attachment.htm 

More information about the dojo-contributors mailing list