let* is the new var

Dave Herman dherman at ccs.neu.edu
Tue Mar 25 15:50:36 PDT 2008


> Is it actually letrec, or is it letrec*?  The example I referred to
> (from the proposal page) would require letrec* semantics:

Let's not go too far with the Scheme analogies, since we're not talking 
about Scheme. :) The idea is just like var-hoisting, only the hoisting 
goes to the top of the nearest block, not the nearest function. Just 
like var-hoisting, the initializer expressions are just assignments that 
happen exactly where you wrote them. So indeed, like letrec*, the 
initializers are evaluated in order from top to bottom.

> It's not just the RI; the official proposal is very specific about let
> semantics.

This is a detail that we should stamp out, I agree. I'll look for a trac 
ticket and file one if there isn't one.

Dave



More information about the Es4-discuss mailing list