[bitc-dev] OCaml syntax question
Sam Mason
sam at samason.me.uk
Thu Mar 5 06:51:22 EST 2009
On Wed, Mar 04, 2009 at 06:44:07PM -0500, Jonathan S. Shapiro wrote:
> Hmm. So I'm wondering whether it is *always* the case that
>
> begin let BINDING in e1 end ; e2
>
> can always be re-written as
>
> let BINDING in e1 ; e2
>
> correctly. It seems to me that this is likely to make reduced closure
> construction harder.
I'm confused; what about constructions of the form:
let a = 1 in
begin
let a = 2 in
print a
end;
print a
I'd expect to print out "1\n2\n" but if you do the above transform you'd
end up with "2\n2\n". I assume I'm missing the point entirely, but
never mind...
--
Sam http://samason.me.uk/
More information about the bitc-dev
mailing list