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

Re: FYI: a metaobject extension



   Date: Wed, 1 Aug 90 10:59 EDT
   From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
   Line-Fold: No

   This sounds like an ideal application of the phrase "semantic chasm."  A
   minor change to the application program is to require that part of the
   application to be rewritten in an entirely different (sub)language?

How minor a change is it really when you go from knowing the (name of
the) class a method will be specialized to at compile time to knowing
nothing about the class until load time?

From the perspective of our colleagues in the rest of the OO community
(C++, Objective-C in particular), this difference would appear pretty
substantial.  Many would argue against it outright, others would just
nod and say that its the kind of crazy thing "those Lisp people" are
always doing.

I actually believe the difference is pretty substantial as well.  This
combination of `dynamic linking' and `treating programs as first class
data objects' is important and powerful.  In the second case, that is
what is happening, and I believe that to avoid confusion, its best to
program in way that makes it clear what you are doing.

Finally, here is another way of thinking about it.  This is phrased in
terms of direct confusion to users, and the kind of trouble we (the
Common Lisp community) always seems to be getting in with our users.

Note that it would not be surprising if the change you are talking about
had an effect on the performance of the method in question --- slot
accesses within its body would be likely not to be optimized.  Now
suppose that some poor user, who doesn't think quite so hard notices
this feature (that defmethod takes class objects) and starts to write a
bunch of code this new way.  Suppose in particular they start to use
this kind of method definition when the other would do.  Then they
complain about how bad a language CLOS is because it doesn't properly
optimize slot access etc.  Some wizard looks at their code, says "You
aren't supposed to program this way, can't you see that there is no way
for these slot accesses to be optimized!  You should be writing this
other way!"  In these kinder and more gentle days, perhaps the wizard
wouldn't scream but would just fix all the code for them.  Either way,
the Lisp community loses a customer because the user says "This is too
complicated, two things that look a lot the same compile completely
differently."