Re: New Feature to JS 1.7

2007-09-26 Thread P T Withington
Your best bet for js1+ is to use one of the many class-like  
frameworks, prototype, dojo, or my favorite, [OpenLaszlo](http:// 
pt.withy.org/ptalk/archives/2006/05/circles_and_arrows.html).  We  
implement `nextMethod` with annotation on the method function objects.

On 2007-09-25, at 02:33 EDT, [EMAIL PROTECTED]  
[EMAIL PROTECTED] wrote:

 As js4 will support OOP natively, this feature will useless for it
 but for js1.7 it will be usefull.
 In js1.7 I can not call next function from prototype chain
 For example:
 function A(){};
 A.prototype.f1= function(){};
 function B(){};
 B.prototype= new A(){};
 B.prototype.f1= function(){ /*How call f1 from prototype A?*/}
 There will be usefull to have next property:

 B.prototype.f1= function() { arguments.inherit( this, arguments ); / 
 *use full feature to call next function in prototype chain */ };
   - Original Message -
   From: Brendan Eich
   To: [EMAIL PROTECTED]
   Cc: Es4-discuss@mozilla.org
   Sent: Monday, September 24, 2007 7:29 PM
   Subject: Re: New Feature to JS 1.7


   JS1.7 shipped in Firefox 2 and it is done. This list is for  
 discussion of ECMA-262 Edition 4 (ECMAScript 4, es4) features and  
 design decisions. See http://www.ecmascript.org/.


   /be


   On Sep 24, 2007, at 12:18 AM, [EMAIL PROTECTED]  
 [EMAIL PROTECTED] wrote:


 Hello
 Where can I post request for new feature to JavaScript 1.7?
 ___
 Es4-discuss mailing list
 Es4-discuss@mozilla.org
 https://mail.mozilla.org/listinfo/es4-discuss




   __ NOD32 2547 (20070924) Information __

   This message was checked by NOD32 antivirus system.
   http://www.eset.com
 ___
 Es4-discuss mailing list
 Es4-discuss@mozilla.org
 https://mail.mozilla.org/listinfo/es4-discuss

___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss


Re: __proto__

2007-09-26 Thread P T Withington
On 2007-09-22, at 17:52 EDT, liorean wrote:

 Which could be done, of course, it should be a simple thing to add
 that in the algorithm for [[Construct]]. But then we have the question
 of what to do with constructors that return other objects than that
 set up by steps 1 through 5 of the [[Construct]] algorithm. A
 constructor can return other objects, you know. You'd have to decide
 whether this property should be set up prior to step 6 in the
 algorithm or subsequent to step 7. If prior, only the original object
 that was created in step 1 gets it, if subsequent, return values get
 it even if they are not the same as the original object.

Dylan has a rule that the constructor must return an object that is a  
subtype of the constructor.  If that were enforced, I would see no  
reason to reset the constructor property of the returned object.

 Actually, I think this would be a nice and simple fix to ES3 that
 probably wouldn't hurt much code out there.

Agreed.  As I mentioned elsewhere in this thread, we do this manually  
in our framework for now.

___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss