Re: [Scheme-reports] Module-level BEGIN is not a BEGIN - please call it something else Andre van Tonder (24 Apr 2011 19:12 UTC)

Re: [Scheme-reports] Module-level BEGIN is not a BEGIN - please call it something else Andre van Tonder 24 Apr 2011 19:12 UTC

On Sun, 24 Apr 2011, John Cowan wrote:

> Andre van Tonder scripsit:
>
>> 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.
>
> I don't understand why you think that.  Module BEGIN does not introduce
> a scope: the only thing that introduces a scope is MODULE.  The contents
> of BEGIN and INCLUDE and INCLUDE-CI are spliced into the module scope.

Well, the imported bindings are not valid outside the module-level BEGIN form.
You cannot import DEFINE and then use it in the module outside a BEGIN form,
so BEGIN delimits a lexical area in the code inside of which imported bindings
are valid and outside of which they are not.

You keep saying module-level BEGIN splices (and teh document also says so on p
21, comapring it to topplevel BEGIN).  This is either wring or we are using a
different sens of "splice".  haven't we already established that module-level
BEGIN is the only BEGIN that /doesn't/ splice?  In other words, unless I am
missing something, module-level BEGIN cannot be replaced by the inclded
sequence.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports