Re: Implicit object constructor misinterpretation
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 24 Oct 2009 20:26:48 +0100
Thomas 'PointedEars' Lahn" wrote:
Richard Cornford wrote:
There is no need to propose any automatic insertion of quotes^^^^^^^
into the source text (or token stream) in order to account for
the behaviour seen. And indeed such insertions would be
contrary to the behaviour observed. For example:-
var x = {
x-y:5
};
- is a syntax error but:-
var x = {
'x-y':5
};
- is not. The first being a mathematical expression in a context
that only allows for Identifiers, string literals and numeric
literals, while the second is a numeric literal.
Do you mean "string"?
Yes I did.
As for the rest, thank you for your patient explanations. One can
only hope something of it gets through to him.
Pigs may fly. ;-)
Richard.
.
- Follow-Ups:
- References:
- Implicit object constructor misinterpretation
- From: VK
- Re: Implicit object constructor misinterpretation
- From: John G Harris
- Re: Implicit object constructor misinterpretation
- From: VK
- Re: Implicit object constructor misinterpretation
- From: Richard Cornford
- Re: Implicit object constructor misinterpretation
- From: Thomas 'PointedEars' Lahn
- Implicit object constructor misinterpretation
- Prev by Date: Re: Implicit object constructor misinterpretation
- Next by Date: Re: Length of longest contiguous digits exercise
- Previous by thread: Re: Implicit object constructor misinterpretation
- Next by thread: Re: Implicit object constructor misinterpretation
- Index(es):
Relevant Pages
|