How Lisp's Nested Notation Limits The Language's Utility
  Home FAQ Contact Sign in
comp.lang.functional only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.functional Profile…
 Up
How Lisp's Nested Notation Limits The Language's Utility         


Author: Xah Lee
Date: May 4, 2007 17:11

How Lisp's Nested Notation Limits The Language's Utility

Xah Lee, 2007-05-03

There is a common complain by programers about lisp's notation, of
nested parenthesis, being unnatural or difficult to read. Long time
lisp programers, often counter, that it is a matter of conditioning,
and or blaming the use of “inferior” text editors that are not
designed to display nested notations. In the following, i describe how
lisp notation is actually a problem, in several levels.

(1) Some 99%% of programers are not used to the nested parenthesis
syntax. This is a practical problem. On this aspect along, lisp's
syntax can be considered a problem.

(2) Arguably, the pure nested syntax is not natural for human to read.
Long time lispers may disagree on this point.

(3) Most importantly, a pure nested syntax discourages frequent or
advanced use of function sequencing or compositions. This aspect is
the most devastating.
Show full article (5.89Kb)
14 Comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Kaz Kylheku
Date: May 4, 2007 17:30

On May 4, 5:11 pm, Xah Lee xahlee.org> wrote:
> How Lisp's Nested Notation Limits The Language's Utility
>
> Xah Lee, 2007-05-03
>
> There is a common complain by programers about lisp's notation, of
> nested parenthesis, being unnatural or difficult to read.

That is false. The complaint does not frequently occur among all of
the complaints occured by the entire population of complaintive
programmers.
> (1) Some 99%% of programers are not used to the nested parenthesis
> syntax. This is a practical problem.

Since 99%% of programmers don't use Lisp, it's not a practical problem.
> (2) Arguably, the pure nested syntax is not natural for human to read.
> Long time lispers may disagree on this point.

Programming language syntax shouldn't be natural for humans to read.
Or, rather, this shouldn't be a requirement which creates technical
compromises.
Show full article (3.42Kb)
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Jon Harrop
Date: May 4, 2007 17:37

Xah Lee wrote:
> vectorAngle[{a1_, a2_}] := Module[{x, y},
> {x, y} = {a1, a2}/Sqrt[a1^2 + a2^2] // N;
> If[x == 0, If[Sign@y === 1, ?/2, -?/2],
> If[y == 0, If[Sign@x === 1, 0, ?],
> If[Sign@y === 1, ArcCos@x, 2 ? - ArcCos@x]
> ]
> ]
> ]
>
> SetDelayed[vectorAngle[List[Pattern[a1,Blank[]],Pattern[a2,Blank[]]]],
> Module[List[x,y],
> CompoundExpression[
> Set[List[x,y],
> N[Times[List[a1,a2],
> Power[Sqrt[Plus[Power[a1,2],Power[a2,2]]],-1]]]],
> If[Equal[x,0],
> If[SameQ[Sign[y],1],Times[?,Power[2,-1]],
> Times[Times[-1,?],Power[2,-1]]],
> If[Equal[y,0],If[SameQ[Sign[x],1],0,?], ...
Show full article (1.27Kb)
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Robert D. Crawford
Date: May 4, 2007 18:11

Xah Lee xahlee.org> writes:
> How Lisp's Nested Notation Limits The Language's Utility

You know, I am all about keeping one's eyes open so as to see the
limitations of the tools one chooses or is forced to use. If more
people were open to the flaws in their OS, religion, editor, and a
myriad of other things the world would surely be a better and more
peaceful place. However, I have to say that all I ever see from you,
Mr. Lee, is complaints and how you want emacs and lisp to change. For
the love of whatever god you choose to pray to, find a frigging tool
that makes you happy. If it is emacs that makes you happy, then change
the things you don't like and be happy but I fail to see how your
whining diatribes serve any useful purpose. If you don't like lisp then
by all means use something else.

No offense but it does get old after a while.

--
Robert D. Crawford rdc1x@comcast.net

Marriage is learning about women the hard way.
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Rayiner Hashem
Date: May 4, 2007 20:56

> (1) Some 99%% of programers are not used to the nested parenthesis
> syntax. This is a practical problem. On this aspect along, lisp's
> syntax can be considered a problem.

The first time I saw graph-theory notation, I thought it was
gibberish. I still think most mathematical notation is gibberish, but
I deal with it --- I don't turn in proofs written in prose.
> (2) Arguably, the pure nested syntax is not natural for human to read.
> Long time lispers may disagree on this point.

And mathematical notation is not natural for people to read, at least
not anybody who grew up learning a natural language. But people deal
with it. They're remarkably adaptable this way.
> vectorAngle[{a1_, a2_}] := Module[{x, y},
>     {x, y} = {a1, a2}/Sqrt[a1^2 + a2^2] // N;
>     If[x == 0, If[Sign@y === 1, π/2, -π/2],
>       If[y == 0, If[Sign@x === 1, 0, π],
>         If[Sign@y === 1, ArcCos@x, 2 π - ArcCos@x]
>         ]
>       ]
>     ]
Show full article (1.43Kb)
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Edward
Date: May 4, 2007 21:07

Xah Lee xahlee.org> writes:
> How Lisp's Nested Notation Limits The Language's Utility
>
> Xah Lee, 2007-05-03
>
> There is a common complain by programers about lisp's notation, of
> nested parenthesis, being unnatural or difficult to read. Long time
> lisp programers, often counter, that it is a matter of conditioning,
> and or blaming the use of “inferior” text editors that are not
> designed to display nested notations. In the following, i describe how
> lisp notation is actually a problem, in several levels.

As a practical matter, most LISPers don't even see the parens, but
rather interpret the code according to the indentation.
> (1) Some 99%% of programers are not used to the nested parenthesis
> syntax. This is a practical problem. On this aspect along, lisp's
> syntax can be considered a problem.

It's certainly different. Whether it is a problem or not depends on
personal or subjective criteria.
Show full article (4.03Kb)
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: fireblade
Date: May 5, 2007 00:16

> \|||/
> (o o)
> |~~~~ooO~~(_)~~~~~~~|
> | Please |
> | don't feed the |
> | TROLL! |
> '~~~~~~~~~~~~~~Ooo~~'
> |__|__|
> || ||
> ooO Ooo
>
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Xah Lee
Date: May 5, 2007 00:30

Xah Lee wrote:
«(1) Some 99%% of programers are not used to the nested parenthesis
syntax. This is a practical problem. On this aspect along, lisp's
syntax can be considered a problem.»

Ken Tilton wrote:
«Simply wrong. What would be a problem would be if they tried it and
could not quickly get used to it.»

I think what you said is part of what i said. But let me elaborate.

Lisp's nested parenthesis certainly is a problem, if you want to
attract programers to lisp and programers are not attracted by sexp in
the first place.

What you expressed, is to consider the question of whether people can
get used to sexp. If programers cannot adapt sexp and find it
comfortable as a syntax of a programing language, then, you consider
THAT, to be a problem of the lisp syntax. Otherwise no problemo.

I think you vantage point is not so goody. But if we consider the
question itself, i think yes, people can adapt and use sexp reasonable
well for programing. Actually, this has been already done i guess...
Show full article (13.94Kb)
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Author: Pascal Costanza
Date: May 5, 2007 03:07

Xah Lee wrote:
> How Lisp's Nested Notation Limits The Language's Utility
>
> Xah Lee, 2007-05-03
>
> There is a common complain by programers about lisp's notation, of
> nested parenthesis, being unnatural or difficult to read. Long time
> lisp programers, often counter, that it is a matter of conditioning,
> and or blaming the use of “inferior” text editors that are not
> designed to display nested notations. In the following, i describe how
> lisp notation is actually a problem, in several levels.
>
> (1) Some 99%% of programers are not used to the nested parenthesis
> syntax. This is a practical problem. On this aspect along, lisp's
> syntax can be considered a problem.

Lisp doesn't have a problem here. Lisp is a programming language, an
inanimate, dispassionate, virtual concept which doesn't (cannot!) "care"
whether it is used at all.
Show full article (1.60Kb)
no comments
Re: How Lisp's Nested Notation Limits The Language's Utility         


Date: May 5, 2007 09:12

On May 5, 1:11 am, Xah Lee xahlee.org> wrote:
> How Lisp's Nested Notation Limits The Language's Utility

Very good. Now, off you go and design and implement an alternative
syntax. It's easy, it's been done hundreds of times. I think I have
two or three limited examples on my web site and several more I never
bothered publishing. There must, as I say, be hundreds of examples
around and probably thousands when you count all the non-published
ones. So pick the best and use them, or, since you're by far the
smartest person here, why not come up with your own? Jon Harrop can
probably help you.
no comments
1 2