Re: MOP question for language lawyers: can you specialize on standard-class
"pc (as pc at p-cos dot net)" <[email protected]> Mon, 18 May 2026 23:20:54 +0900
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
> On 18 May 2026, at 04:31, Tim Bradshaw (as tfb at cley dot com) <[email protected]> wrote: > > On 17 May 2026, at 02:02, Pascal Costanza <[email protected]> wrote: >> >> Why? > > Because I think that it would be reasonable for a compiler to be able to assume that for, say > > (locally (declare (type x a)) ... no assignment to a ...) > > that a was in fact an x throughout. I can write programs where the following holds: (progn (assert (typep a ‘x)) (locally (declare (type x a)) (setq a …) (assert (typep a ‘x))) (assert (typep a ‘x))) Likewise: (progn (assert (typep a ‘x)) (locally (declare (type x a)) (change-class a …) (assert (typep a ‘x))) (assert (typep a ‘x))) >> 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. > > Hello, is anyone there? Did I say that Julia's object system was slow? I think I did not say that. Hello yourself? Did I say that you said that? > Does Julia's object system have a MOP? Does it allow the class of an object to be changed? What happens when you redefine a composite type (hint: instances remain instances of the old type, in the old world). Gosh, not very like CLOS, is it? You conveniently leave out the part of my email where I expressed that I’m not convinced of some the design decisions in Julia, but where I think you could get around them. Why don’t you just ask the question? Anyway, I don’t like participating in discussions where somebody is “exaggerating for effect.” That reminds me too much of the bad days in comp.lang.lisp. Feel free to have the final word in our exchange. Pascal _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html