On Aug 17, 2007, at 3:37 PM, Brendan Eich wrote:
> On Aug 17, 2007, at 1:10 PM, Garrett Smith wrote:
>
>> what is the difference between x1 and x2?
>>
>> class A {
>>const x1;
>>static final x2;
>
> You need a var before x2. Also you can't add final except before
> classes and methods (the
This has come up on this list before; please see the archive:
https://mail.mozilla.org/private/es4-discuss/2007-January/thread.html
(the "inheriting statics" thread).
Also, what section 9.2.7 do you mean? Could you cite the URL of the
document containing that section? Thanks,
/be
On Aug 17,
On Aug 17, 2007, at 1:10 PM, Garrett Smith wrote:
> what is the difference between x1 and x2?
>
> class A {
>const x1;
>static final x2;
You need a var before x2. Also you can't add final except before
classes and methods (the reference implementation currently parses
'class A { stati
On Aug 17, 2007, at 2:47 PM, Garrett Smith wrote:
> It would be nice to have Array literal syntax declare it's ArrayType
> before the declaration of the array.
>
> For example:
>
> 1. var x : Array = [ "foo", "bar", document.title,
> getAnotherString() ];
Array is not a parameterized type. If i
It would be nice to have Array literal syntax declare it's ArrayType
before the declaration of the array.
For example:
1. var x : Array = [ "foo", "bar", document.title, getAnotherString() ];
2. var x = [ "foo", "bar", document.title, getAnotherString() ] : String;
example 1 is more clear to re
9.6.2 It is an error for the 'this' or 'super' expression to appear in
the body of a static method.
1. Is this error mentioned a compile-time error?
2. Why does 'this' in a static method generate an error? (it shouldn't
refer to the class?)
3. does 'superclass' in a static method refer to the clas
The example in section 9.2.7 demonstrates static members, including
those of an ancestor superclass, being accessible through an instance.
Section 9.6.2 clearly states that static methods are not accessible
through derived class objects (though does not mention anything about
static properties).
What is the difference between a class's prototype object and it's
instance properties?
class A {
var x : uint = 10; // instance property.
prototype var x : uint = 20; // another instance property in the
prototype chain.
}
class B extends A { }
My understanding is that the result would be:
what is the difference between x1 and x2?
class A {
const x1;
static final x2;
}
___
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss
Peter,
This was my confusion, as well. I was about to send a reply to Cormac's
email but, in working through my reply, I realized what was going on.
The types are not quite equivalent to substituting T1 and T2, because
Self is the concrete object type which needs to be a subtype of the
defined t
I think my confusion here, is perhaps that I'm seeing this a slightly
different way. What you are saying seems to suggest that Self type
annotations can behave differently at runtime. To me, this example
from the wiki should be an error:
type T1 = { f:function(this:Self, z:Self):Self, w:int}
var x
11 matches
Mail list logo