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

My $.02 on PUSH

   I've just been assaulted by 16 count 'em 16 messages on PUSH,
dutifully wrapped in headers, mailed to Delaware, and forwarded to
California. (DoD is paying for this?)

   A bit of history. Riesbeck insists that I am responsible for
having reversed the order of parameters to PUSH in UCI LISP.  He claims
that Rutgers LISP (one of the LISPs merged into UCI LISP) did it the
other way around.  I deny all this, but his conviction is stronger
than mine, so maybe he's right.  "Mea culpa" to those of you who want
the stack to come last.  I most certainly did NOT change the order of
parameters to PUTPROP (Margot, where DID you get that idea?), as you
can check by looking at any vintage Stanford LISP 1.6 Manual.

   On the issue itself, I have only a few comments. First of all, most of the
flaming is silly.  There are good arguments for both versions of PUSH; it's
not some obvious, gross error.  Moreover, lots of things are like that.
I.e., idioms exist in programming languages as well as natural languages.
There's a limit to how clean you make any language. Beyond a certain point,
you stop shouting, learn the convention, and go back to work.  Nobody ever
said that programming was supposed to be intuitively obvious.  Some things
(organic chemistry, twelve-tone rows, and PUTPROP) just take time to learn.
So what? 

  One of the joys of LISP, in my view, is that you can extend it to suit
your own tastes. You don't like PUSH?  Fine -- define your own function
(the Burger King approach).  Sure, (PUSH X Y) may be ambiguous, but no
respectable programmer would misunderstand (PUSH (CONS X Y) Z) or
(PUSH X (CONS Y Z)).  Better yet: You want English? You got it.  In UCI
LISP at least, PUSH is a macro, and it's downright trivial to redefine
it to include a "guide word": (PUSH A ONTO B).     

   I take programming-aesthetic arguments with a grain of salt, but what
does irritate me are arbitrary changes that INTRODUCE incompatibilites
or inconsistencies.  I am one of the greatest fans of the AIP book, and
I've probably taught it to as many students as anyone else has, but for the
life of me, I don't know why they made PUSH different from UCI LISP, which
they use as the dialect for the rest of the book.  Likewise, I think all the 
neat stuff in TLISP was great, but restricting channel names to be legal JFNs
was a piece of crockery that eliminated, as a side-effect, one of the
elegant things about old INPUT, namely, that it took a STREAM of files
as its parameter; pretty neat for 1960's software. 

   As far as T is concerned, I'm resolved to the fact that I'm going to
have to re-learn a lot of nitty-gritty information: NTH returns elements
now instead of tails, MAP is actually MAPCAR, etc.  Undoubtedly, I'll
wind up writing a UCI LISP - to - T translator. As long as there's SOME
good reason for the differences, I don't mind so much, given that it's
a new language anyway.  

   You think we got problems?  The physicists have just learned that the
sun isn't spherical, and Einstein's theories assumed it was. Back to the
drawing board, in spades!  At least they don't send messages to each other 
claiming the sun SHOULD be round.