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

Re: generic types vs. specific types



The use of a small set of generically useable types
is one of Lisp's best features.  In other languages
which have user-defined list structure data types,
because each application uses a nominally new and
different type (even though it is for something that
Lisp lists would work fine for), all the wheels have
to get re-invented for it.

The same goes for things that are really numbers.
It would be a bad idea to have a different data type
for characters if that means that all the fine old numeric
functions don't work on them.  The user should not have
to have a whole new set of CHAR-+, CHAR-<, CHAR->, CHAR--,
CHAR-LOGAND, CHAR-BOOLE, etc, etc.

But if objects of the new character data type are accepted
by everything that would work on a number, then they might
be a reasonable idea.  Aside from a few things like PRINT,
everything else should treat a character object just like
the fixnum we use now.  Then the new data type will not
be a burden on anyone.

However, don't expect it to solve problems of transfer
between character sets except of the most minor sort.