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

Re: Sealed as Source Annotation



Maury Markowitz maury@remove_this.sympatico.ca.invalid on  2000-07-14 17:00
wrote:

> "P T Withington" <ptw@callitrope.com> wrote in message
> news:B594BB23.8427%ptw@callitrope.com...
>> I think I disagree with this idea, because I think part of the design (and
>> contract) of a class is whether you expect it to be extended or not.  A
>> class that you design to be open requires much more engineering than a
>> sealed one.
> 
> While this might be true, it seems to put the crat before the horse.  This
> feature was (apparently) added to allow the compiler to do things, not for
> the user to hide things.

I don't think it a matter of cart and horse.  I think the concepts go
hand-in-hand.  A philosophy behind the design of Dylan is that you should
pay only for what you use.  Thus, the default is that classes are not
extensible and they are not externally visible.  When either of these
features is needed, they must be requested.  The explicit request alerts the
designer both to the additional runtime cost and the need for additional
engineering.



References: