Forwards-compatible syntax proposal
Steven Mascaro
subs at voracity.org
Fri May 16 21:33:48 PDT 2008
Ian Hickson wrote:
>> Another reaction is that there are ES4 source fragments that
>> /can/ be parsed by ES3 compilers, but whose meaning will silently
>> be something completely different in the two versions of the
>> language. Here are some:
>>
>> // a generator expression in ES4, a loop calling a function
>> // in ES3
>>
>> function f(x) {
>> for ( i=0 ; i < 10 ; i++ )
>> yield (f(), i)
>> }
>>
>> // (artificial) three statements in ES3, two in ES4
>>
>> x = this function
>> f(x)
>> { x++ }
>
> I think this is very dangerous, and unwise, in the context of the Web. I
> strongly believe that if we want to have success in expanding the Web
> platform, backwards-compatibility is critical. But that's another issue.
I agree. Lars, surely this is unacceptable by your very own reasoning
--- because there will be ES3 code that will run in ES4, but with
silently different behaviour.
More information about the Es4-discuss
mailing list