Subject: Re: Dylan and Lisp From: Erik Naggum <erik@naggum.no> Date: 1999/11/09 Newsgroups: comp.lang.lisp Message-ID: <3151137468311529@naggum.no> * Jochen Schneider <josch@isg.cs.uni-magdeburg.de> | I got a related question. Does CL have "primitive types"? yes, but we name them accurately "system classes". a _type_ is a set of values of a given class. some languages don't have any means to express this, so conflate "type" with "class". some languages don't have type hierarchies and think "primitive type" is a good idea to make different from all other types. this is an issue of forcing the user to be acutely aware of implementational considerations on the hardware, so the types should be more accurately be called "hardware types" and "software types" in such languages. | I mean, can or can't you write a method for, e.g., numbers that get | dynamically dispatched? yes, NUMBER is a system class. so are its two disjoint subtypes REAL and COMPLEX, the two disjoint subtypes RATIONAL and FLOAT of REAL, and the two disjoint subtypes INTEGER and RATIO of RATIONAL, but the subtypes FIXNUM and BIGNUM of INTEGER and {SHORT,SINGLE,DOUBLE,LONG}-FLOAT are not system classes. you can still dynamically dispatch on them in most CLOS implementations, however, because they form implementation classes. | What's the deal with the typecase macro? it is to TYPEP what EQL is to CASE. (I don't think this answered your question, but it is not a very answerable question -- it seems to say, because of the preceding tone, that you disapprove of it because it isn't OO, which is a silly reason. I can't make you approve of something you don't yet understand, and won't waste my time to help you understand when approval precedes understanding. back up a bit and desire to understand before you want to approve or disapprove, and this might change.) #:Erik -- Attention Microsoft Shoppers! MS Monopoly Money 6.0 are now worthless.