[Prev][Next][Index][Thread]

Re: Some Dylan improvements



On Thu, 30 Mar 2000 16:38:14 +0100 (BST), Hugh Greene <q@tardis.ed.ac.uk>
wrote:

> On Thu, 30 Mar 2000, Jason Trenouth wrote:
> > On Thu, 30 Mar 2000 [...], Hugh Greene <q@tardis.ed.ac.uk>
> > > On Thu, 30 Mar 2000, Scott McKay wrote:
> > > > Eric Gouriou wrote in message <38E1B578.BC05AD4E@cup.hp.com>...
> > > > > ... Proposed changes (more comments below) ...
> > > > >B) add a way to specify a module interface beyond mere names
> > > > 
> > > > I think this is a good idea ...  Yes, there is the "two hunks of code"
> > > > problem, but ... if this were an optional part of 'define module', it
> > > > would be worth trying. 
> > > 
> > > Yes, absolutely, this should be optional, just like type declarations,
> > > sealing etc.  I see no reason why you shouldn't provide type info for some
> > > exported names and not for others (in which case they'd effectively have
> > > type <object>), specially in incremental development.
> > 
> > An alternative might be to put the note on the binding definitions:
> > 
> > 	define exported generic foo () => ();
> > 
> > This would avoid the redundancy. Modules definitions would then be reduced to
> > importing.

I was just playing devil's advocate. My actual position is that we have should
other things to worry about than language definition issues. 

> Err, no, sorry, because: 
> 
>   (a) Eric's (or at least my) idea is that the exported type might be a
> supertype of the implementation type, so you can swap implementations
> without recompilation;

How that is this a problem? Just put "exported" on the types you want to
export.

>   (b) you might well want to export the same name from several modules
> (maybe with different types), and maybe not at all from the one in which
> it's defined (using the "create" clause);

Ah yes. ("create" exports doesn't it? I'm forgetting... )

>   (c) I'm sure there was a (c) but I've lost my train of thought here :-)

Reexporting?

Perhaps we don't need all this flexibility? (50% :-j)

__Jason


Follow-Ups: References: