Subject: Re: macros vs HOFs (was: O'Caml)
From: Erik Naggum <erik@naggum.no>
Date: 13 Sep 2002 23:41:16 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3240949276974621@naggum.no>

* Gareth McCaughan
| It's sort of true that if you're doing static types then you need to
| consider types to be disjoint, in that you need to know *the* type of every
| expression in the program, but that's perfectly compatible with having
| subtype relations too.  Integer can be a subtype of Rational even if
| everything gets typed either as Integer or as Ratio.

  One of the major problems I have with strong typing is precisely that it
  flies in the face of another pretentious theory, object-orientation, which
  supposedly should have a type hierarchy and run-time dispatch on the type of
  the actual object.  The two theories seem to be seriously at odds.  What we
  have in Common Lisp is thoroughly object-oriented approach.  This should be
  good, but somehow the strongly-typed nutjobs go "eep, eep" (thanks, Tim) and
  seem to ignore that their theories are all bunk if they cannot handle a type
  hierarchy.  Even before I started programming in Common Lisp, I found the
  desire to know /the/ (single) type of every expression to be suspect and the
  theories wanting when they made that premise.  As if you could not reason
  about types unless you had only one type!  As if you could not operate with
  union types created on the fly!  All bunk, I say.
  
| Of course, (truncate (/ x y)) feels inefficient. But it doesn't take a
| specially smart compiler to make that feeling an illusion.

  Not so.  Please remember the secondary return value.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.