From: "M. Edward (Ed) Borasky" Date: 2006-08-07T01:26:43+09:00 Subject: Re: the perens in lisp dilects is there for a reson... macros. Charles Hoffman wrote: > On Sun, 2006-08-06 at 13:34 +0900, Rick DeNatale wrote: > >> On 8/5/06, Daniel Martin wrote: >> >>> atbusbook@aol.com writes: >>> >>> >>>> >>>> > > Oh, and if anyone's keeping score, the parens in Lisp/Scheme are there > to structure the code and data. Where other languages are full of {}, > [], ;, and all sort of other punctuation marks, in Lisp you only > have/need parentheses to serve all the same purposes. It doesn't have > anything to do with macros per se. > > --ch-- > There's a bit more to it than that. Ironically, Lisp originated as an implementation of "parenthesis-free (Polish) prefix" notation in symbolic logic. That is, rather than write "A + (B * C)" one writes "+ A * B C". The parentheses came about for a number of reasons: 1. Unlike my example, Lisp functions even in Lisp 1 did not have a fixed arity, 2. As someone already pointed out, S expressions used them, 3. It's more natural when you have multi-character atoms, etc. So in Lisp you end up with "(PLUS A (TIMES A B))". The reverse Polish form "B C * A +" is what the early compilers generated, and is now known as Forth. :) Incidentally, the original Lisp spec had list elements separated by commas, for example "(ALPHA,(BETA,GAMMA))". There was a bug/feature in the first implementation that allowed spaces, and the rest is history. :)