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

Re: Sundry Dylan Questions



On Tue, 26 Jun 2001 10:40:39 +0100, Hugh Greene <q@tardis.ed.ac.maps.uk> wrote:
>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".

Heh, you're right. I just took a look at the DRM again, and there's
this two page discussion of why this is a bad idea (which is why I
remembered it as illegal), and then it says that the compiler should
allow it but issue a warning. :)


Neel




References: