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

Re: [Q] Dylan to Java/JVM compiler?



On 5/4/01 5:15 PM, Lieven Marchand, (mal@wyrd.be), wrote:

> CL is OO from the ground up in any reasonable definition of the
> term. And you might want to study CLOS a bit more before pronouncing
> things impossible ;-)

Sorry, I clearly misspoke when I wrote that specializing on instances of
built-in classes was impossible in CLOS. I was confusing this with the
inability to subclass built-in classes. Anyway, here's the full HyperSpec
passage on the limitaions of CLOS built-in classes:

"A built-in class is a class whose instances have restricted capabilities or
special representations. Attempting to use defclass to define subclasses of
a built-in class signals an error of type error. Calling make-instance to
create an instance of a built-in class signals an error of type error.
Calling slot-value on an instance of a built-in class signals an error of
type error. Redefining a built-in class or using change-class to change the
class of an instance to or from a built-in class signals an error of type
error. However, built-in classes can be used as parameter specializers in
methods. "

So CLOS built-in classes are a bit like primitive types, in that, there are
things one can do with other classes and objects that one may not do with
CLOS built-in classes or instances thereof. In this regard, CLOS is not OO
from the ground up in the way Smalltalk,for example, is. Of course Smalltak
lacks multiple inheritance and multiple dispatch, so...



> Is there at this moment a Dylan compiler that beats a good CL compiler
> on equivalent code? Theoretically, the Dylan compiler can potentially
> do better by the sealing constructs, but that's about the only
> difference I see between CL and Dylan w.r.t. possible optimisation.

You may recall that I referred to the "Holy Grail of Dylan..." I didn't
claim that it had been achieved. Personally I prefer Common Lisp, because I
think that Dylan, as implemented to date, has more the feel of a statically
compiled language, despite its name (DYnamic LANguage). I even prefer
Smalltalk to Dylan because it is implemented more dynamically.

Thanks for pointing out my error in any event.

Regards,

Raf

-- 

Raffael Cavallaro, Ph.D.
raffael@mediaone.net



Follow-Ups: References: