From ... From: Erik Naggum Subject: Re: Parentheses Hierarchy Date: 1999/07/24 Message-ID: <3141819444951656@naggum.no>#1/1 X-Deja-AN: 504763647 References: <379489D3.C4241361@qcunix.qc.edu> mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * joe comunale | Hi, I am an admirer of LISP... I only wish I knew it better. That being | said, I would like (and dare) to suggest an improvement - introducing an | idea we use in Physics. physics is a field very heavily optimized for those who understand it, or to put it another way: it is not a field well known to treat beginners nicely and many people are unable to grasp physics for a multitude of reasons. you are therefore importing a trait from a beginner-hostile world to another world that is not nice to you as a beginner simply because you are _not_ a beginner in the former and are a beginner in the latter. this is a ridiculously naïve approach to solving problems. | I submit a sample comparison test below: | | (cond ( ( = 0 (mod n i) ) ( + i sum ) ) ) Lisp programmers write (cond ((= 0 (mod n i)) (+ i sum))) and don't have a problem with it, but if they do, they break it into two or three lines, as several people have shown. moreover, modern-day programmers appear to think color is the answer to all problems, so those who think this is worth doing would colorize the condition differently from the consequent. since you can add color without affecting the syntax, I would suggest you investigate that option as a beginner rather than suggest changes that could only affect future code, unless you were willing to make changes to the way you view code. however, once you start down the road of making modifications to how you view code, there's nothing to stop you from making your proposed syntax change locally so that you see more diverse parens, but the file contains normal parens. I view it as a serious short-coming of programming textbooks that they don't deal with issues of representation and presentation. it's integral to Lisp whose lists have a linked list representation and a parenthesized presentation, whose integers are sometimes made up of "bigits" but still print like normal integers, and myriad other useful layerings of abstract idea, machine representation, and presentation forms to the human. take this Y2K silliness, which should be regarded as a monumental flaw in the way people are taught how to deal with dates and time. | My point is to set this up in the "kernel" and enable everyone, | especially struggling students (like myself), to easily read LISP. noble goal, but your suggestion is missing the boat -- students exposed to your redesign would be at loss if you weren't also going to re-publish all textbooks using your new system. I suggest you use colors as your first approximation to ease readability, and if you can't do that, use a paren matching mode that highlights the form the cursor/mouse is over, and then resort to syntactic rewrites in the display to the user. and if you aren't using Emacs, now is a good time to start. programming it is even done in a sort of Lisp. (don't pick up too many habits, though.) #:Erik -- suppose we blasted all politicians into space. would the SETI project find even one of them?