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

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



In article <13046@well.UUCP> nagle@well.UUCP (John Nagle) writes:

This is very confused.  It's hard to know where to begin.

	It's more of an MIT vs the rest of the LISP world tradition.

If you are contrasting Lisp and Scheme, it's hard to see how this can
be a conflict between MIT and the rest of the Lisp world.  Scheme is
 from MIT.  Traditionally, the Lisps with the best numeric support,
compared to other Lisps, are *also* from MIT (particularly the NCOMPLR
for Maclisp).

   Although Common LISP has data type declarations of a sort, they tend
   not to be taken all that seriously by compilers.  

This is not the case.  Many major Lisp compilers for standard
hardware, such as Lucid and Franz, pay close attention to numeric
declarations, and produce far better numeric code when the
declarations are present.

						     CLTL is very weak
   on this subject: 

Yes; this is intentional.  The idea is to accomodate both standard
hardware, for which the declarations are needed, and Lisp machines,
for which they are superfluous.

		    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.

What?  The reason that the Symbolics LM-2 lacked floating point
hardware had nothing to do with a "strong expression of a feeling"; it
was due to marketing timing and economics.  The LM-2 was just a
repackaged MIT prototype, and the idea was to get it shipped as fast
as possible, reserving improvements for later hardware platforms.
Machines that were actually designed by Symbolics all had floating
point accelerators, generally based on Weitek floating point chips.
Symbolics typically did very well in Lisp floating point benchmarks.
Furthermore, I know of no "faction" anywhere in the Lisp world that
claims that floating point is unimportant.

   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.

That the language should not REQUIRE declarations.  And it didn't
require any lobbying; the conventional-hardware faction agreed with
the philosophy that declarations should be optional hints from the
user to the compiler.  Guy Steele, Richard Gabriel, and Scott Fahlman
never have advocated mandatory declarations of the types of variables
in Lisp.  There was plenty of lobbying during the design of Common Lisp,
but not about this point.

	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.

You bet.  There is no committment to "strong typing" (typed variables)
in Common Lisp.  This is very much intentional.

	What people tend to actually implement are systems in which all objects
   are "LISP objects", and are still individually allocated and pointed to.

Yes, in the general case.

   Defining an array of "short-float" is likely to generate an array of pointers
   to LISP objects.  

Nope.  Not on Symbolics machines and not on the conventional-machine
implementations that I'm aware of.  Lisp objects are not always
implemented as pointers; they can be stored "immediately".  The
technique of doing this for numbers is nicknamed "inums" and has been
around for at least 15 years.

And none of this has anything to do with the original query, since
Lisp and Scheme are essentially the same in these regards.  Scheme
doesn't have typed variables, either.