Message-ID: <Pine.NEB.4.40.0111091829000.7153-100000@panix3.panix.com>
From: Alan Sondheim <sondheim@panix.com>
To: CYBERMIND@LISTSERV.AOL.COM
Subject: [7-11] [.dotagon]about syntax of LISP @ oth (fwd)
Date: Fri, 9 Nov 2001 18:29:08 -0500
---------- Forwarded message ---------- Date: Fri, 9 Nov 2001 22:58:38 +0100 From: "scientist@o-o.lt" <scientist@o-o.lt> Reply-To: 7-11@mail.ljudmila.org To: o-o@konf.lt, 7-11@mail.ljudmila.org Subject: [7-11] [.dotagon]about syntax of LISP @ oth about syntax of LISP @ oth http://slashdot.org/article.pl?sid=01/11/03/1726251 Kent M. Pitman Answers On Lisp And Much More Posted by timothy on Thursday November 08, @11:45AM from the 64kb-is-the-limit dept. A few weeks ago, you asked Kent M. Pitman about Lisp, Scheme, standards, and other things -- He"s answered your questions below, at length. At such length, in fact, that only the first eleven of his answers are shown below -- expect more shortly! Thanks, Kent. 1) (just one thing (I) want to (know))? by An Anonymous Coward (( What ( (is) with (all) ) of (the) ()s? ) Hmmm? ) Kent M. Pitman: This question actually got scored down to -1 and marked as a troll question, but I fished it out of the barrel and restored it because everyone asks and I might as well confront the issue head-on. Ironically it"s non-Lisp languages that allow and encourage you to put ()"s in any place you want, as if there were no meaning to the introduction of gratuitous paren groups. 3+(2*5)+7 means the same thing in an algebraic language as does 3+2*5+7. In Lisp, we write: (+ 3 (* 2 5) 7) This shows you the structure and means you never have to learn obscure precedence rules that make expressions like -3! confusing in algebraic languages, where you must learn whether it means (-3)! or -(3!). In Lisp, the parens would show you immediately that (factorial -3) or (- (factorial 3)) was intended. The thing I personally like about (+ (* 2 y) x) rather than 2*y+x is that it simplifies my editing. I"m a touch-typist and I use the emacs commands to go forward and backward over expressions, to swap expressions, and to delete expressions very heavily. And I don"t have to reach for the mouse to manipulate large, complex expressions because they are paren-bounded. If I put the cursor at the head of 2*y+x and say "go forward an expression", ought this go forward over 2, 2*y, or 2*y+x? Having different editor commands to move across a sum, a product, etc. would be unwieldy. Yet without that, I don"t see how the editor would know. In Lisp, there can"t be any ambiguity because every sub-expression has its own start character, so a single notion of "the expression in front of the cursor" or "the expression after the cursor" suffices. Name: scientist@o-o.lt Date: 09.11.2001 22:58 Email: scientist@o-o.lt Web: http://www.o-o.lt/agon/argument/index.php?p_cmd=entry&p_entry=84 _____ _ _ # > # __/\__ |___ | / / | __/\__ |___ | / / | # > # \ / / /____| | | \ / / /____| | | # > # /_ _\ / /_____| | | /_ _\ / /_____| | | # > # | | \ / / /____| | | # > # /_ _\ / /_____| | | /_ _\ / /_____| | | # > # | | \ / / /____| | | # > # /_ _\ / /_____| | | /_ _\ / /_____| | | # > # | | \ / / /____| | | # > # /_ _\ / /_____| | | /_ _\ / /_____| | | # > # _____ _ _ # > # __/\__ |___ | / / | __/\__ |___ | / / | # > # \ / / /____| _____ _ _ # > # __/\__ |___ | / / | __/\__ |___ | / / | # > # \ / / /____| | | \ / / /____| | | # > # /_ _\ / /_____| | | /_ _\ / /_____| \/ /_/ |_|_| \/ /_/ |_|_| # > # # > # # > #1.7.100(today="7-11.00 > # \ / / /____| | | \ / / /____| | | # > # \ / / /____| | | \ / / /____| | | # > > > Thank you for participating in 7-11 MAILING LIST > SUBSCRIBER SATISFACTION SURVEY. > > > > > ###################################################### > #1.7.100(today="7-11.00 071101010 07110101 0711.00100# > # # > # _____ _ _ _____ _ _ # > # __/\__ |___ | / / | __/\__ |___ | / / | # > # \ / / /____| | | \ / / /____| | | # > # /_ _\ / /_____| | | /_ _\ / /_____| | | # > # \/ /_/ |_|_| \/ /_/ |_|_| # > # # > # # > #1.7.100(today="7-11.00 071101010 07110101 0711.00100# > ########### http://mail.ljudmila.org/mailman/listinfo/7-11 _____ _ _ # > # __/\__ |___ | / / | __/\__ |___ | / / | # > # \ / / /____|################################################################## >## ############ ########## # ### ### ## ###### > #### ###### #### #### ###### ############## ###### > # #### ##### #### ########## ###### ### ####### > > >