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

Re: "Scheme has data types and Lisp doesn't."



     It's more of an MIT vs the rest of the LISP world tradition.
Although Common LISP has data type declarations of a sort, they tend
not to be taken all that seriously by compilers.  CLTL is very weak
on this subject: "As an example, consider the type (array short-float).
Implementation A may choose to provide a specialized representation for
arrays of short floating-point numbers, and implementation B may choose
not to."  Serious number crunching with implementation B will probably
be rather slow.  There's a faction in the LISP world that feels that
floating point is unimportant.  The strongest expression of this feeling
was in the early Symbolics machines, which lacked floating point hardware.
Much of the weakness on typing in Common Lisp reflects lobbying from the
Symbolics faction, which generally supported the idea that everything
possible should be dynamic.

     Reading section 4.5 of CLTL (Common Lisp, the Language) will give
you a good feeling of the weakness of the commitment to strong typing
in Common Lisp.

     What people tend to actually implement are systems in which all objects
are "LISP objects", and are still individually allocated and pointed to.
Defining an array of "short-float" is likely to generate an array of pointers
to LISP objects.  Declaring an argument to a function to be of a specific 
type may turn off some checking.  

					John Nagle