On Fri, May 1, 2015 at 2:33 PM, Jonathan S. Shapiro <[email protected]> wrote:
> On Fri, May 1, 2015 at 11:14 AM, Raoul Duke <[email protected]> wrote:
>>
>> > x is not rebound because it has gone out of scope. Most functional
>> > languages nonetheless diagnose this as a rebinding.
>>
>> wow, i never knew/noticed that.
>>
>> seems kind of lame to me.
>
>
> I'd characterize it as a discrepancy between the semantics and the
> requirements of usability. From a semantic perspective, there actually *is*
> a top-level let binding whether you use LET or DEF or some other keyword.
> What's odd about this case is that when LET is used at top-level it has
> different behavior than when it is used internal to a procedure (where a
> second binding of x after the first binding goes out of scope usually is NOT
> diagnosed.
>
> To put it another way: diagnosing the rebinding means that in a weird way a
> let-bound binding places it's symbol in a special scope that is just
> *outside* the scope of the let and just *inside* what we would normally
> think of as the parent scope. We can certainly tell a story about that which
> makes the behavior consistent, rational, and explained. It's just that this
> story isn't the story we are actually telling about the behavior of LET. :-)

This sounds way too weird. Which languages do this? SML or OCaml? Can
you give some code showing why it doesn't work the way PKE says? Pal's
story is how I always understood it.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to