Subject: Re: Learning programming languages
From: Erik Naggum <>
Date: 1999/07/23
Newsgroups: comp.lang.lisp
Message-ID: <>

* Tim Bradshaw <>
| For most purposes (people will disagree...) you can think of classes as
| simply the representation of types in the language: every class
| corresponds to a type, every object has a class.
| Before CLOS it was already possible to add new types to the language, and
| to define them as `subtypes' (subclasses, really...) of other types --
| not for all types, only for `structure' types.

  Tim, don't set the guy up for even more confusion than he "deserves".
  _types_ in Common Lisp are orthogonal to classes, and have nothing at all
  to do with subclasses.  e.g., the types BOOLEAN or KEYWORD, both of which
  are only partitions of the value space of the class SYMBOL, or FIXNUM and
  BIGNUM, which are but partitioning the value space of the class INTEGER.
  of course, a type can exhaustively cover the value space of a class, but
  that is trivial. e.g., (SIMPLE-VECTOR (SIGNED-BYTE 32) (128)), objects of
  which type would still be instances of the system class VECTOR.  (no,
  there is no _class_ named SIMPLE-VECTOR, nor classes for all specialized
  vectors, but STRING and BIT-VECTOR are exceptions to this rule.  sorry
  for the pedantry. ;)

| You can dispatch on *any* Lisp type (as you could before if you wanted
| to).

  this is false.  you can only dispatch on classes in CLOS.

  suppose we blasted all politicians into space.
  would the SETI project find even one of them?