[Laszlo-dev] For Review: Change 20090514-ptw-4 Summary:, Fix brain-oh in addProperties

André Bargull andre.bargull at udo.edu
Fri May 15 08:02:19 PDT 2009


> Yeah, except that a common JS idiom is: if (...) { var x = ... } else 
> { var x = ... } I guess we could just say "don't do that".
I think that idiom is too common among Javascript developers, so we 
shouldn't (cannot) forbid it.

> Also, coming in ES5: `let`, which is `var` with block scope. I wonder 
> if anyone will ever use var once that is available...
I'd be cool to have this for our ES3 runtimes. Can it be implemented by 
renaming `let` variables in scopes? So in the example from above:
if (...) {
  let x = ...
} else {
  let x = ...
}
=>
if (...) {
  var $x$123 = ...
} else {
  var $x$456 = ...
}

> On 2009-05-14, at 11:25EDT, Henry Minsky wrote:
>> > I have a proposal, if we ever get some time from Don, we should  
>> > implement a
>> > warning in our compiler when it notices you declaring the same var  
>> > twice in
>> > function scope.  I'll file a JIRA for it..


More information about the Laszlo-dev mailing list