(Lots of ((Irritating, Spurious) (Parentheses)))

Mar 04, 2005 14:29


Derisive comments are often made about the syntax of Lisp, as witness some reproaches on my previous blog entry. Thus the half-joking, half-serious backronym of Lots of (Insipid | Irritating | Infuriating | Idiotic | ...) and (Spurious | Stubborn | Superfluous | Silly | ...) Parenthesesand accusations that Lisp syntax would make ( Read more... )

lisp, tao of programming, meta, dynamism, essays, code evolution, en

Leave a comment

Comments 22

averros March 5 2005, 02:23:56 UTC
In the end, when people attack the syntax of Lisp, it is most usually but a rationalization without any technical merit regarding the syntax itself. This rationalization serves to cover up a defense mechanism against a foreign culture.

You are making two assumptions: 1) that this is a foreighn culture, and 2) that this is all a matter of psychological hang-ups of the "mainstream" programmers.

Well, 1) is basically an accusation in being uneducated, or simply unable to comprehend the obvious superiority of your preferred approach. Well, you are making very unwarranted assumptions about your opponents. I am a specialist in programming languages (among other things), wrote some compliers and interpreters, and consider myself rather familiar with LISP and its numerous progeny (Planner, Schema, etc). I would reiterate that any person with university CS education was exposed to LISP, and had a fair chance to learn how to use it. In any case, I do not think that this is an argument which is suitable for a civilized discussion ( ... )

Reply

Natural Languages? averros March 8 2005, 00:18:05 UTC
Of course, this can be changed. Just rewrite math textbooks, convince educators and everyone dealing with formulae to change their ways.
Even that only evades the issue. Because why has hundreds of years of mathematics evolved a sub-optimal method of expression? In fact, we might well ask why (all? most? many?) natural languages are complex context-sensitive beasts. Are we merely at the mercy of the very first grammarian, or is their something in our primitive brain which is wired to be more receptive to complex grammars?

Reply

Re: Natural Languages? fare March 8 2005, 00:29:15 UTC
(1) The usual mathematical notation with lots of symbols in an infix way makes a lot of sense when you write on a 2D piece of paper or blackboard. But it's just not adapted to text-based programming.

(2) Grammars are not complex, but big. That is, each rule is simple, but there are lots of rules. A massively parallel brain can cope with that. That is, as long as it has to deal with similar stuff.

(3) Programming is different from the usual stuff. Semantics is part of programming, and it's part of what any programmer must master so as to write decent programs. Some languages make it easier to discuss semantics than others.

(4) Lisp doesn't prevent from learning lots of rules. Actually, in Common Lisp (as opposed to say Scheme), there is a tremendous lot of rules. But these rules are in the semantics, not in the syntax. So that the programmer will focus on what matters rather than be diverted in details.

Reply

averros March 8 2005, 11:36:41 UTC
1) The screen in front of me is flat 2D thingie with somewhat worse image quality than printed paper. Did I miss something? And, yes, it is perfectly capable of displaying math notation, as evidenced by the snippet of paper on the LQG in the adjacent window :)

2) The human brain is massively parallel. And it has the benefit of some billions years of evolution in dealing with large detailed spatial environments. Which do not have any recursion to speak of, are not regular or repetitive, and cannot be combined in any meaningful way. The most important thing is to recognize them by multitude of visual, aural, olfactory or tactile cues - and so not to get lost ( ... )

Reply


averros March 5 2005, 02:24:01 UTC
It's a protective reflex against the cost of having to actually learn something new and different. The problem about Lisp here is not directly related to technical factors, but only to the fact that Lisp culture is not mainstream.

Many of us have actually forgotten LISP (heh, I wrote some stuff in in for BESM-6 when I played with language transforms in the university). Pascal and LOGO, too. It is not new, by any means. No doubt, C is a glorified assembler, C++ is ugly and sometimes infuriating, and Java is a fascist's wet dream, but somehow they're still the most practical tools for doing things like operating systems, object request brokers, databases, routing software or (oh, horror) business apps. I wish it could be better, as there is clearly a lot of room for improvement (my pet peeve is that Algol-68 was undeservedly forgotten - it had lots of interesting ideas in it, some of which found their way into variety of languages; and, besides, I worked on a A-68 compiler project, which makes me impartial :) However, insisting that ( ... )

Reply


Programmable programming language? anonymous April 25 2005, 11:26:04 UTC
For me, the problem with lisp syntax is not that it's unreadable and that parentheses are weird (in fact, I find them to be a very elegant idea) but I always think about the programmable programming language thing. It's true, Lisp is flexible, but at what cost? At the cost of having no syntax at all. The point is that lisp does not make user-made extensions (functions, macros) as powerfull as all the other language constructs, it makes all the "default" language constructs as powerfull as user ones. It makes you "customize" the language just because everything in the language is "like" user-made functions. Of course doing that has its advantages, no other programming language can be as metaprogrammable as lisp, so it's a matter of taste. There is TCL, that's really close to lisp, but without parentheses and with a nice "trick" to eval infix syntax for mathematical expressions (and I wonder why usually lispers does not seem to care much about it). There are some C-like languages for example that have lisp-like macros, but they are even ( ... )

Reply


fixing lisp anonymous January 28 2006, 18:15:22 UTC
(deffun foo()
(let ((a 1) (b (+a 1 2) (c 3))
(if (= a 1)
(setq c 2) (progn

Reply


fixing lisp anonymous January 28 2006, 19:09:53 UTC
(deffun foo ( ... )

Reply

Re: fixing lisp anonymous February 13 2007, 04:36:10 UTC
Re: fixing lisp anonymous June 30 2008, 15:55:34 UTC
That's still not quite right, since you can't a variable bound in the same let for defining another one within the same let-head, since they are bound "in parallel":
(let ((a 1)
(b (+a 1 2)) <- This will fail
(c 3))
You could however use let* for that kind of thing.

Reply


Leave a comment

Up