On Fri, Aug 22, 2008 at 10:22 AM, Ingvar von Schoultz
<[EMAIL PROTECTED]> wrote:
>
>    let (a = 3)
>    {   x = 5;
>    }
>
> If you put |let (a = 3)| above your block, this might tell the
> compiler that you want everything neatly declared at the top,
> and therefore want an error thrown at the undeclared x. A strict
> mode regarding declarations.


var x;

let (a = 3) {
  ...
  x = 5 * a;
  ...
}

This is perfectly reasonable code.  If the assignment throws, the
language is broken.
Now, if you erase the "var x" line, the only difference, semantically,
is that the assignment is to a property of the global object.  Not
great style, but I'd still expect it to work.

-Jon
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to