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
Sorry for my English
We implement `nextMethod` with annotation on the method function objects
When will you implement 'nextMethod'?
- Original Message -
From: P T Withington [EMAIL PROTECTED]
To: [EMAIL PROTECTED]@aldec.com
Cc: Brendan Eich [EMAIL PROTECTED]; Es4-discuss@mozilla.org
It's nasty, but works if f1 is from prototype of A but not from the
constructor of A.
Even more it is hardcoded, so if you change name 'A' to 'A1' you must change
everywhere in your code.
OpenLaszlo ](http://pt.withy.org/ptalk/archives/2006/05/circles_and_arrows.html)
implementation of a class
We do not get any bugs about this at bugzilla.mozilla.org
That may be in WEB few people work with null values and there too few big
applications ( are they exist at all? ) on client side
So people do not commit any bugs.
Why other languages do not do so? There may be a good cause
I think that
I think switch ... case construction must be interpreted as:
function f(g) {
if( x == g() ) // case g():
if( // case ...
}
- Original Message -
From: Dave Herman [EMAIL PROTECTED]
To: Lars T Hansen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED];
I think this is the best:
1) Variable in 'switch' is parameter for case
2) 'case' triggers if result of case expression is 'true'
So.
switch( aaa )
case some expression:
case another expression:
...
After JS processing
if( modified some expression ) {
if( another modified expression ) {
switch( obj ) {
case instanceof String:
break;
case instanceof Number:
break;
}
___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss
Does instanceof operator check 'constructor' property in [proto] chain?
- Original Message -
From: liorean [EMAIL PROTECTED]
To: es4-discuss@mozilla.org
Sent: Sunday, October 21, 2007 8:03 PM
Subject: Re: instanceof Operator
On 21/10/2007, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have clone objects like this:
//
function cloneObject( srcObj ) {
if( srcObj == null ) { return srcObj; } //undefined or null
var newObject;
switch( typeof(srcObj) ) {
case object:
newObject = new srcObj.constructor();
Question in subject
___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss
10 matches
Mail list logo