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

Re: Some Dylan improvements



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, Jason Trenouth wrote:
> > > On Thu, 30 Mar 2000 [...], Hugh Greene <q@tardis.ed.ac.uk>
> > > An alternative [to putting type info in module definitions] 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.

You, Jason?  Never!  ;-P

> My actual position is that we have should other things to worry about
> than language definition issues.

We do!  But OTOH, we've been saying that for several years ...
 
> > 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.

When I said "exported type" I meant "the type of the exported object", not
"the object you're exporting, which is a type", sorry.  Say you have

  define constant $foo :: <simple-object-vector> = #[ ... ];

You might want the exported (interface) type to be <vector>, or
<sequence>.  Similar cases could arise for GF domains (assuming we have
more info that just "<function>", like the "limited(<function>)" idea
which keeps cropping up).  I can't see how to do that with your idea,
without writing "wrapper" definitions. 

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

No, that wasn't it, but that's a good point.

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

Well, I can see a clear use for what I'm thinking of: swapping used
libraries without needing to recompile.  We have managed to work around
that for a while, hackily, and I'm not saying we should implement it now,
but I feel this is more than just featuritis.  OTOH, maybe The Right Thing
includes so much more stuff (versioning, platform-specificity) that
extended module definitions aren't enough ... I dunno.

-- Hugh



References: