From ... From: Erik Naggum Subject: Re: RFC: Lisp/Scheme with less parentheses through Python-like significant indentation? Date: 2000/08/10 Message-ID: <3174904618055769@naggum.net>#1/1 X-Deja-AN: 656762237 References: <3990E003.6EE78131@kurtz-fernhout.com> <3991A692.4AABB074@norvig.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 965916445 14501 195.0.192.66 (10 Aug 2000 14:07:25 GMT) Organization: Naggum Software; vox: +47 800 35477; gsm: +47 93 256 360; fax: +47 93 270 868; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 10 Aug 2000 14:07:25 GMT Newsgroups: comp.lang.lisp * Peter Norvig | But when I write code on paper, I often use a style like this to | save time. Interesting (implicit) question. When I worked with Ada some 15 years ago, it was the first and so far the last language where my notes on paper were practically syntactically valid -- they had to be to be meaningful. Some of the redundancy you find in most other languages can be ignored when writing on paper, in some almost all. (C has a _lot_ of redundancy, for instance, mostly because of its sorry excuse for an explicit static typing system.) | Actually, there are other aspects of Lisp syntax that I find more | annoying than the parens. Compare | | s.X[i] = val | to | (setf (aref (csp-state-x s) i) val) Some of this may be handled by a specialized infix reader. I prefer to bind "mathematical" syntax to $, so $ ... $ is a "mathematical" form. (The choice of delimiter should be obvious, and if anything is obvious when it comes to special mathematical syntax, it's $.) | And also because classes are namespaces in Python/C++, but not in | Lisp (so I can use X instead of csp-state-x). Huh? Of course you can use X. Accessors are generic functions. I don't like the dot notation, as I already pronounce (x s) as "x of s", and that's as fitting for slot accessors as for function calls, which means that "s.x" gets the order wrong. (I could pronounce it "s's x", mirroring the Norwegian pronounciation "s sin x", but that has always rubbed me the wrong way.) $ (x s)[i] <- val $ If the dot notation is important, it shouldn't be hard to add. #:Erik -- If this is not what you expected, please alter your expectations.