[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Module-level BEGIN is not a BEGIN - please call it something else
On Sun, 24 Apr 2011, John Cowan wrote:
> Andre van Tonder scripsit:
>> It cannot be replaced by the sequence it encloses as in all other
>> instances of BEGIN.
> Not all BEGINs can be removed in this way: (if (p) (begin (a) (b)) (c))
> cannot be rewritten as (if (p) (a) (b) (c)), for example. BEGIN is
> already very overloaded, but the concept is the same.
Granted, but nowhere else does BEGIN introduce a new lexical scope.
>> In fact, the outer BEGIN is bound (part of the module language) while
>> the inner BEGIN is unbound (since the base library is not imported).
> In fact, there is no concept of binding in the module language, which is
> not Scheme.
Okay, but still, in the example
(begin (begin 1)))
the outer BEGIN has a meaning and the inner begin is unbound and therefore
has no meaning.
So I guess my biggest problem with this overloading is that module
BEGIN does not just indicate a sequence, but also delimits a lexical
scope. This makes it morally very different form all the other BEGINs,
which never delimit a new lexical scope.
Scheme-reports mailing list