Canvas is-an Encoder?
Marcel Weiher
320089961391-0001 at t-online.de
Wed Jun 28 22:46:30 UTC 2000
> >Why is Canvas a subclass of NullEncoder and FlattenEncoder, lately?
>
> I think you gave the right answer already and also suggested the right
> refactoring to get rid of that inheritance dependency (which btw,
doesn't
> allow to remove postscript printing completely).
Encoders actually have nothing to do with Postscript, except that
the Postscript support is also built on top of them, so there is no
dependence 'Canvas --- depends-on---> Postscript support', which
would clearly be wrong.
The naming of the category they're in is misleading (and not mine).
Anyway, as anyone who actually had a look at the code would figure
out instantly, Encoders are an extremely light-weight abstraction
that factors out some patterns that commonly occur. They have been
built very carefully not to include any extra 'fluff', which I would
have thought is a *good* thing, but which seems to cause trouble with
no end in sight, because everybody seems to just jump at
conclusions.
Sigh,
Marcel
More information about the Squeak-dev
mailing list
|