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

"Pascal Costanza (as pc at p-cos dot net)" <[email protected]> Sun, 17 May 2026 10:00:51 +0900
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>

> On 17 May 2026, at 05:05, Tim Bradshaw <[email protected]> wrote:
> 
> I have also written programs that made use of it.  Bur I've come to the view that (eq a b) but not (equal (type-of a) (type-of b)) is an abomination: if two objects are the same object their types should be the same type.

Why?

In my case, they are of the same common super type. This is equivalent to what in more recent languages is called an interface. (I am thinking more of Go than of Java here, but Java is close enough.)

Still, why?

> I think a much more serious problem with CLOS is the 'we made it so you can never really optimize anything' thing, especially if you take the AMOP MOP seriously.  That is fixable I think (I'm slowly writing some ideas on how it might be fixed).

Julia already solved it. It uses a combination of type parameters, just-in-time compilation and inlining to optimize methods, and gets extremely good results. It also uses a concept of "world age" to allow for redefining methods without impacting existing inlined calls, which I'm less convinced of, but you can get around that.

I don't think that AMOP is in the way of doing something similar in Common Lisp.

Pascal

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