From: Tony Finch (dot@dotat.at)
Date: Sun Jan 14 2001 - 22:56:23 PST
Mark Day <markday@cisco.com> wrote:
>> any chance of an excerpt ?
>
>OK, but these excerpts are from The Little Lisper, which I have on my shelf,
>and which has been replaced by The Little Schemer.
There's also The Little MLer, for those that prefer languages with a
proper type system.
The less flippant and more even-handed version of this advocacy goes
as follows: I actually prefer Haskell's type system to ML's --
Haskell's is a superset of ML's that adds a kind of OO based on
interface inheritance, rather than implementation inheritance like
languages descended from SIMULA. However Haskell is theoretically weak
compared to ML -- ML has always been at the vanguard of serious
theory, in the beginning because it was the context in which useful
polymorphic type inference was invented, and more recently because the
rock-solid theory in its definition allows people to do develop new
optimisations based on type theory etc. The more theoretically
tractable the language the more easy it is for a compiler to
understand programs written in the language and thereby do advanced
optimisations. I'm particularly thinking of the really cool stuff that
Mads Tofte and his group at DIKU did recently on compile-time memory
management, i.e. no GC, no refcounting, no calls to malloc() in the
source, everything done for you as efficiently as a heroic programmer
would code. Going back to the Lisp world, the work on type inference
has fed back into some Scheme compilers. Stalin is a highly optimising
compiler for Scheme that uses a loose version of type inference to
approach the performance of ML. However to make the best use of it you
have to write ML in Lisp syntax; good programmers do this anyway, but
still they might as well just switch to ML and get a proper syntax and
a compiler that tells them when they are being stupid.
Tony.
-- f.a.n.finch fanf@covalent.net dot@dotat.at "Plan 9 deals with the resurrection of the dead."
This archive was generated by hypermail 2b29 : Mon Jan 15 2001 - 17:51:05 PST