[Laszlo-dev] final vs. sealed
P T Withington
ptw at pobox.com
Thu Apr 23 08:04:34 PDT 2009
Dylan had this cool concept of a "sealed" class. It meant the class
was "final" outside the library, but you could still subclass it in
the library.
What I want to do:
I want to subclass LzEvent to make a special LzIdleEvent that
automagically registers itself for the idle kernel callback when it is
ready. The only way I can see to do this is really a pain. I think I
have to make LzEvent an interface, so it can continue to be used in
type declarations, then I have to make a private base class that is
not final that implements LzEvent, then I have to make a public class
that is a subclass of that but final that is used for all actual
events visible outside the LFC. Finally, I can make LzIdleEvent a
public final subclass of the private base class and add my
functionality there... What a pain!
Am I missing something obvious?
More information about the Laszlo-dev
mailing list