[Prev][Next][Index][Thread]
Sealed domain question
-
Subject: Sealed domain question
-
From: Chris Double <cnd@ihug.co.nz>
-
Date: Tue, 20 Jul 1999 19:30:04 -0400 (EDT)
-
Organization: None.
-
Sender: Chris.Double@DOUBLE
-
User-Agent: Gnus/5.070083 (Pterodactyl Gnus v0.83) Emacs/20.3
-
Xref: grapevine.lcs.mit.edu comp.lang.dylan:10333
If in a library I have the following definitions:
define open abstract class <base> (<object>)
end class <base>;
define class <derived> (<base>)
end class <derived>;
define sealed domain make(singleton(<derived>));
define sealed domain initialize(<derived>);
The module in this library exports <base> and <derived>.
In another library which uses the above module I try:
define method initialize( o :: <base>, #key) => ()
// do something
end method initialize;
With Harlequin Dylan I get a sealed domain error:
"This method on initialize cannot be added because it is in a domain
declared sealed in library x."
I know 'initialize' is a sideways definition and is not necessarily
good style but this structure comes up in some code I'm trying to
compile with Harlequin Dylan. Should it be a sealed domain violation
if <base> is open and unsealed?
Chris.
Follow-Ups: