Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: Virtues(?) of Lisp syntax Keywords: syntax words,functions Message-ID: <3427@skye.ed.ac.uk> Date: 14 Sep 90 20:21:11 GMT References: <3368@skye.ed.ac.uk> <1350030@otter.hpl.hp.com> <3408@skye.ed.ac.uk> <3450@syma.sussex.ac.uk> Reply-To: jeff@aiai.UUCP (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 51 In article <3450@syma.sussex.ac.uk> aarons@syma.sussex.ac.uk (Aaron Sloman) writes: >It wasn't till I read this remark of Jeff's that I realised that one >reason I don't like Lisp is that, apart from "(" and ")", Lisp >doesn't help one to distinguish syntax words and function names. Actually, Pop-11 doesn't do much along those lines either. It's not like it uses a different font for them (cf Algol). >Moreover, the syntactic redundancy involved in using different >closing brackets for each construct in Pop-11 really does make it >much easier for many readers to take in programs, >E.g. the use of essentially redundant keywords like "then", "elseif" >and "else" in conditionals, and the use of distinct closing brackets >like "endif", "endwhile" that remind you what sort of construct they >are terminating, has a particularly important consequence. It >reduces short term memory load, [...] Now, there's no doubt soemthing to what you say. However, I don't think there's as much to it as you suppose. One of the *mistakes* some people make when writing Lisp is to try to add the redundancy you describe by putting certain close parens on a line of their own followed by a comment such as " ; end cond". It makes the code *harder* to read, not easier. People just starting to use Lisp, and people who use editors without a good Lisp mode (which at least used to include the PopLog editor that comes with Pop-11), may well find it helpful; but experienced Lisp programmers generally do not. Lisp procedures should be fairly short and indented so that it's easy to see the scope of a construct: everything up to the next line not indented more to the right. Putting in lots of end markers makes this harder to see, and short-term mempory doesn't have much problem keeping track. Of course, it's no doubt possible to write procedures (such as ones that are too long) where end markers might make a difference. But is is also possible to avoid those cases, just as it is possible to avoid other bad practices. Moreover, if you want to argue for the advantages of distinct closing brackets it's not necessary to compare Pop-11 with Lisp. How about comparing it with a language that uses "begin" and "end" (or "{" and "}") for everything rather than "endif" "endwhile", etc.? I think there are too many other differences between Pop-11 and Lisp. -- Jeff