> Was let*, possibly under some other name, ever discussed/proposed?
> For let definitions, I think the following is supposed to work:
>
> {
> let x = n;
> let y = foo(x);
> ...
> }
>
> That is, x and y should be bound sequentially, not in parallel, right?
Neither, actually -- for let declarations. In your example, both x and y
are bound in the entire block -- this is hoisting just like `var',
except it's only hoisted to the top of the block instead of the
function. This might sound surprising, but this means that it's letrec
rather than let*.
For let expressions and let statements, though, I agree with you. I
think we ought to have let* semantics, and as you say I think the RI
currently implements let semantics.
Dave
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss