Re: MOP question for language lawyers: can you specialize on standard-class

"Tim Bradshaw (as tfb at tfeb dot org)" <[email protected]> Mon, 18 May 2026 14:40:09 +0100
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
On 18 May 2026, at 10:13, Didier Verna (as didier at didierverna dot net) <[email protected]> wrote:
> 
> Now here's a story. I had a stool in my living room, but last week I
> knocked it up a backrest. Now it's a chair. Still the same object to me
> though...

I have a car (actually, not yet).  In 1924 there was definitely a car.  Today there definitely is also definitely a car.  Some of the bits of today's car are the same bits as the bits that made up that 1924 car: most of the engine I think, probably the radiator surround.  At least some other bits.  The chassis is 'the same' except that it was built as a long-chassis and now is short.

Is it the same car?  Or is it a car which shares parts with the original car?

There is also a famous ship.

So much of the history of OOP is 'person who has naive idea of things like identity of objects in the world thinks that they can model naive idea in a computer'.  First of all: those people should probably have talked to people who actually have spent time thinking about these things (I am not such a person; I have spoken to such people; sometimes I have understood what they said).  Secondly, if we haven't worked out by now that things in computers are not generally very like things in the world then I give up.

Look, I don't really care about change-class: have it and use it if it makes you happy.  I care about something else.

Lisp is not slow: CLOS is.  Generic functions are not slow: they're often a bit slower than plain functions but they do a lot more.  But accessing slots of subclasses of standard-object *is* slow.  And not just a bit slow: about two orders of magnitude slower than structure slot access.  That's slow enough to matter.

Now you can say well, nobody cares about performance, and you can be wrong.  You can say that, well, forty years isn't enough to work out how to make it fast, and you can be wrong.  You can say well, systems with multiple-inheritance are always really slow, and you can be wrong.  You can say, well, it is all so wonderful and full of features that people will use it anyway, and you can be wrong.  Worse: you'd be wrong *and boring*: prescribing the old nostrums again and again.

Or you can try to work out *what makes it so slow* and *how might that problem be dealt with*.  Now that's something that is at least interesting.

OK, I am done.


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html