new enum idiom

Gareth McCaughan Gareth.McCaughan at pobox.com
Sun Jan 21 17:03:21 EST 2001


Robert Amesz wrote:

> Ah, Lisp, so beautiful, so pristine, so ... verbose. Well, it's great 
> for lists, but anything numeric is a chore. Let's see:
>    (EQ (PLUS 1 1) 2)
>    t
> Phew, so least that's still true... ;-)

Er, you mean
  (= (+ 1 1) 2)
not
  (eq (plus (1 1) 2))
actually.

If you do a lot of numeric stuff and find Lisp syntax
a chore, you can define some read-macros to let you say
something like

  [1+1==2]

instead. There's something called "mathtran" that does
this sort of thing, though I think its syntax is a little
different.

Interested parties may wish to see
  http://web.ukonline.co.uk/g.mccaughan/g/remarks/with-open-file.html
for some further remarks on the illusion of Lisp's verbosity. Or not,
as the case may be. :-)

-- 
Gareth McCaughan  Gareth.McCaughan at pobox.com
sig under construc



More information about the Python-list mailing list