[plt-dev] syntax/module-reader and #%module-begin

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Dec 1 14:36:44 EST 2009

It's too bad this can be only a convention and nothing that's enforced.

On Dec 1, 2009, at 1:51 PM, Carl Eastlund wrote:

> On Tue, Dec 1, 2009 at 1:10 PM, Stevie Strickland <sstrickl at ccs.neu.edu 
> > wrote:
>> On Dec 1, 2009, at 12:06 PM, Sam TH wrote:
>>>>>> The reason I've asked this is that a reader that adds
>>>>>> `#%module-begin' will be broken if it's added by
>>>>>> `syntax/module-reader' unconditionally.
>>>>> That is a potential problem.  Are there any languages that do that
>>>>> right now?
>>>> I don't know -- that's (part of) my question.
>>> If there are, and they're hard to fix (ie, on planet), then I  
>>> think we
>>> should adopt your suggestion.  Otherwise, we should keep the rule
>>> simple.
>> No language in the PLT Scheme code base does this.  Unfortunately  
>> the first PLaneT
>> language I looked at, Jay's datalog package, does.  Since I'm  
>> already 1/1 for PLaneT
>> packages adding them, I'm going to stop looking there and just go  
>> ahead and change the
>> code to only add the #%module-begin if it's not a single expression  
>> that already has one.
> It is probably worth documenting (a) that syntax/module-reader does
> this, and (b) that it is a deprecated practice; i.e. that future
> language readers should always leave the #%module-begin up to
> syntax/module-reader.  Going forward, we should really pick one way
> and stick with it.
> --Carl
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Posted on the dev mailing list.