[dojo-contributors] dojo.lang.inherits

Scott J. Miles sjmiles at turbophp.com
Wed Apr 5 18:51:18 EDT 2006


At the Dojo meeting today (4/5/2006), dojo.inherits came up and we agreed to
open up the discussion to the general contribs list.
 
There are two (arguable) faults in the dojo.inherits implementation:
 
1. invoking super class methods is wordy and inconvenient.
2. there is no separation between constructor initialization and instance
initialization.
 
There is general agreement that we want to 'let JS be JS'.

With regard to (2), my personal opinion is that JS doesn't have an axe to
grind with respect to initialization, and there is nothing un-JS about
supporting a systemic instance initialization function (that is to say, a
standard way of specifying an instance initializer). 

Alex seemed right-away to have an idea of how tweak dojo.inherits to add
such a feature (yay). We briefly discussed adding additional parameters to
inherits vs. a key-word style signature. I prefer the former, but there was
no general agreement.

There was some talk about the term 'inherits' implying a non-JS idiom, but
this is not a problem IMO. Any suggestions for new nomenclature are
appreciated.

Re (1), nobody seemed to have a handle on how to make calling
inherited/parent/base-class methods easier. Morris has developed his own
inheritence system that may provide a solution.
 
Thanks for listening. :)

Regards,
Scott J. Miles
TurboAjax Group
http://www.turboajax.com

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/301 - Release Date: 4/4/2006
 




More information about the dojo-contributors mailing list