[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLX draft 3 revisions
Date: Wed, 13 May 87 18:55:35 PDT
From: Warren Harris <harris%hplwhh@hplabs.HP.COM>
> Since you've got:
> drawable-depth, drawable-root, drawable-x, drawable-y, drawable-width,
> drawable-height, drawable-border-width
>
> How about getting rid of:
> window-depth, window-root, window-x, window-y, window-width,
> window-height, window-border-width
> and
> pixmap-depth, pixmap-root, pixmap-width, pixmap-height
>
> -LaMott
With the advent of generic functions, I don't see why we need to
prefix these accessors with their types anyway. Why not just: DEPTH,
ROOT, X, Y, WIDTH, HEIGHT, and BORDER-WIDTH? (I know X and Y aren't
very good function names, so how about LEFT and TOP with slots renamed
accordingly.) In the mean time (before generic-functions are
available), these functions can be built from typecase statements.
Warren
P.S. CLOS committee -- why all this :accessor-prefix stuff? Since
methods always do the "right thing" we need no longer resort to clever
naming schemes in order that our programs do the right thing. Surely
a concept such as HEIGHT is the same regardless of whether we're
talking about windows, fonts, displays, etc.
Two issues are raised here: how should specific pieces of clx functionality
be named and what good are accessor prefixes anyway? I was addressing the
former, not the latter. My claim was that for the above-named functions, a
single "X" in the clx package can reasonably represent the functionality of
"drawable-X", "window-X", and "pixmap-X".
As far as the appropriateness of prefixes, I think it's fair to say that
their use is a matter of personal style. Since many people do find
prefixes useful, it is entirely appropriate to have them be a language
feature. But I think it's also fair to say that if there were better
integration between the realizations of "class", "package", and "module" in
Common Lisp, the use of prefixes would be far less widespread. I'm sure
this will happen -- it just hasn't happened yet.
-------