[Prev][Next][Index][Thread]
Re: Sundry Dylan Questions
On 25 Jun 2001, Neelakantan Krishnaswami wrote:
> On Mon, 25 Jun 2001 12:42:49 +0100, Roland Paterson-Jones
> <rolandpj@bigfoot.com> wrote:
> >
> > 1. Can you import classes/generic functions from another library and
> > then seal them?
>
> No, since sealing has global semantics.
>
> Suppose you have a library L1 that exports an open class <foo>. Now
> if library L2 extends <foo> with a subclass <bar>, and library L3
> declares <foo> sealed, then you have an inconsistency.
> ...
Actually, IIRC, you *can* seal a domain from another library, at least
in FunDev, but (a) you'll get an error if an inconsistency like the above
results; and (b) you'll get a warning anyway. Also IIRC, you can add the
(non-standard) adjective "sideways" to the "define sealed domain" to make
the warning go away: all it means is "yes, I know I'm sealing something
from another library, I meant to do that".
It's a bit of an oddity in Dylan that you can seal domains from
another library like this, but not classes.
HTH,
Hugh
--
Version 3.1 GCS/IT d- s+:+>+: a- C++$ UL P+ L+(++) E W++$ N++ o K++ w(++) O?
M V? PS(+) PE Y+ PGP->++ t(+) 5+(++) X(+) R tv b++ DI+ D+ G e++ h- r>++ y+
(Removed reversed spam from my email address to reply)
Follow-Ups:
References: