function hoisting like var -- Was: Re: Surprising semantics

2008-07-24 Thread Ingvar von Schoultz
} } Is the outer Test set to three, or has an inner Test been created that can take the value? Every program would become impossible to understand, an unintelligible mess. With my subject line surprising semantics I didn't mean to advocate more surprises, I wanted less! I assumed

{{ ... }} -- Was: Re: Surprising semantics

2008-07-22 Thread Ingvar von Schoultz
to understand, an unintelligible mess. With my subject line surprising semantics I didn't mean to advocate more surprises, I wanted less! I assumed that ES3.1 and ES4 declarations would work like ES3 declarations do: The declaration spans the entire scope from before you enter the scope and throughout

Re: Surprising semantics

2008-07-21 Thread Ingvar von Schoultz
of function(), in that the assignment comes later than usual, this is not a case of hidden surprising semantics. The programmer did specify that the function Fn depends on if(Unknown). This obeys what the programmer said. It would be wrong to decide upon one of the two functions and assign

Re: Surprising semantics

2008-07-19 Thread Ingvar von Schoultz
impossible to understand, an unintelligible mess. With my subject line surprising semantics I didn't mean to advocate more surprises, I wanted less! I assumed that ES3.1 and ES4 declarations would work like ES3 declarations do: The declaration spans the entire scope from before you enter

Re: Surprising semantics

2008-07-18 Thread Waldemar Horwat
We've been down this road before, and the arguments you present have been hashed out over years. This approach doesn't work. Read the archives of the ES4 group. The problem is that you then get a plethora of ways to define things: var const function type namespace let let const let function

Surprising semantics

2008-07-17 Thread Ingvar von Schoultz
These are some impressions looking at what I expect from the language, and how some things in the specification can cause confusion. I would have contributed here during the discussions, but I discovered the mailing lists just a couple of days ago. I expect the compiler's interpretation of