This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A module system should resolve, not introduce, name conflicts


Look at the digest from comp.lang.scheme which I've included below.

A guy has read R5RS and tries to define a procedure with the perfectly
reasonable name `unit'.  But MzScheme chokes on this since their
module system uses the syntactic form `unit'.

Jonathan Rees's module system for Scheme48 (the description of which
I've also included below) shows how a module system can avoid creating
name conflicts like these.

My position is that the idea of mixing forms of the module
configuration language with the bindings it's supposed to manage is
flawed.  Using Marius' terminology it's even more clear: The name
space manager should not contaminate the name space.

Here's Rees's paper:

module.ps




Topics:
   Unit & MzScheme
   Re: Unit & MzScheme


----------------------------------------------------------------------

Date: Thu, 17 Feb 2000 14:13:50 +0200
From: Miki Tebeka <mtebeka@intel.com>
Subject: Unit & MzScheme
Message-ID: <Pine.WNT.4.21.0002171411550.158-100000@ilsnt0396.iil.intel.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello All,

Anyone knows why the follwing happens in MzScheme:

> (define (unit) unit)
compile: illegal use of a syntactic form name in: unit

But in STk:
STk> (define (unit) unit)
unit

???

Bye.

- -----------------------------------------------------------------------------
Smile, damn it, smile.

(lambda (msg)
  (case msg
	((name)		"Miki Tebeka")
	((email)	"tebeka@lycosmail.com")
	((homepage)	"http://www.tebeka.freeservers.com")
	((quote)	"I don't suffer from insanity, I enjoy every minute of it.")))


------------------------------

Date: Thu, 17 Feb 2000 10:35:04 -0500
From: "Joe Marshall" <jmarshall@alum.mit.edu>
Subject: Re: Unit & MzScheme
Message-ID: <JyUq4.39927$vi4.95688@dfw-read.news.verio.net>
References: <Pine.WNT.4.21.0002171411550.158-100000@ilsnt0396.iil.intel.com>

MzScheme's module system uses a macro called "UNIT"
Just use some different name, like YOUNIT.

Miki Tebeka <mtebeka@intel.com> wrote in message
news:Pine.WNT.4.21.0002171411550.158-100000@ilsnt0396.iil.intel.com...
> Hello All,
>
> Anyone knows why the follwing happens in MzScheme:
>
> > (define (unit) unit)
> compile: illegal use of a syntactic form name in: unit
>
> But in STk:
> STk> (define (unit) unit)
> unit
>
> ???
>
> Bye.
>
> --------------------------------------------------------------------------
- ---
> Smile, damn it, smile.
>
> (lambda (msg)
>   (case msg
> ((name) "Miki Tebeka")
> ((email) "tebeka@lycosmail.com")
> ((homepage) "http://www.tebeka.freeservers.com")
> ((quote) "I don't suffer from insanity, I enjoy every minute of it.")))
>



------------------------------

End of forward2511gUE Digest
****************************



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]