From: Duane Rettig on
On Apr 22, 3:00 am, Nick Keighley <nick_keighley_nos...(a)hotmail.com>
wrote:
> On 22 Apr, 10:57, Nick Keighley <nick_keighley_nos...(a)hotmail.com>
> wrote:
>
>
>
>
>
> > On 21 Apr, 23:27, p...(a)informatimago.com (Pascal J. Bourguignon)
> > wrote:
>
> > > Pillsy <pillsb...(a)gmail.com> writes:
> > > > On Apr 20, 11:43 pm, Günther Thomsen <guenth...(a)gmail.com> wrote:
> > > >> This comes up every now and then. I'm not sure whether this
> > > >> parenthesis-paralysis is actually a real problem or an often-repeated
> > > >> myth.
>
> > > > I'm increasingly convinced that parentheses are the fundamental reason
> > > > that Lisp isn't a lot more popular than it is. Syntax really matters
> > > > to people, and the reasons it matters are rooted in subjective
> > > > judgements about "prettiness" or "ease of reading". It so happens that
> > > > a lot of programmers hate the parentheses for subjective reasons that
> > > > simply don't apply to Lisp users because if they applied, we wouldn't
> > > > be Lisp users.
>
> > > We should tag  "(this is a list)"  in front of each primary school of the
> > > world! :-)
>
> [layout de-googled]
>
> oddly I used to (when writing english (as a teenager)) deeply nest
> parentheses, I was much more tolerant of nested structures (than most
> people), combining this with my "lite" (never start an (unnecessary)
> new paragraph (a stop (will do)) never start an (unnecessary) new
> sentence (a comma (will do))), I'm surprised my english teacher isn't
> now confined to some (padded) room drawing ()'s on the walls (with
> crayons). I also taught myself to stop doing this.

If you're looking for a computer language that feels like natural
language, Lisp is definitely not for you. Other programming languages
go to great lengths to provide the shortcuts and ambiguities that
natural languages provide, and with those ambiguities come
misunderstandings, where the speaker or writer says one thing and the
listener/reader hears another. This ambiguous communication is not
acceptable in a computer language, though many programmers search for
the ultimate language that can be "natural" and yet unambiguous.
Lisp's parens remove several major causes of syntactic ambiguity.

There are often several reasons why ambiguities work in natural
languages. The ideal reason, especially for spoken language, is
because there is interaction to disambiguate when communication occurs
(though often courses taught to perform "active listening" can get
very expensive). Sometimes correct communication is not the highest
priority; often the listener hears what he wants to hear, and so it
wouldn't have mattered what the speaker had said anyway. Also,
speaking in a precise way often causes the listener to lose focus or
interest, and that defeats the purpose of the communication anyway,
even if the listener wanted to understand what the speaker was saying.

It's good that you learned not to be so precise in your writing,
because that way you would lose your readers less often. It was
likely a process of feedback anyway, where you asked yourself "Why
aren't they listening to me?" and finally figured out the answer. But
a computer always listens to exactly what you have to say (or else is
considered broken) so that natural aversion you learn to speaking or
writing precisely doesn't apply in a computer language.

Use the right tool for the job. Natural language is not the right
tool for talking to a computer at the lowest level.

Duane
From: Alan Malloy on
Nick Keighley wrote:
> On 21 Apr, 15:51, Tamas K Papp <tkp...(a)gmail.com> wrote:
>> On Wed, 21 Apr 2010 07:04:14 -0700, Pillsy wrote:
>>> On Apr 20, 11:43 pm, G�nther Thomsen <guenth...(a)gmail.com> wrote: [...]
>
>>>> This comes up every now and then. I'm not sure whether this
>>>> parenthesis-paralysis is actually a real problem or an often-repeated
>>>> myth.
>
> in my experience it's real
>
>
>>> I'm increasingly convinced that parentheses are the fundamental reason
>>> that Lisp isn't a lot more popular than it is. Syntax really matters to
>>> [people]
>> That's like saying that the requirement to engage in abstract thinking
>> is the fundamental reason that makes (serious) mathematics unpopular.
>> Maybe. But there is nothing you can do about it: you can't make it
>> "easier" without making it uninteresting.
>
> I think my problem is never understood *why* I had to tolerate the
> pain. I don't know if they didn't say or if I didn't listen but Lisp
> just seemed perverse to me. I've never been good at learning things
> "because I say so" (I was a late reader as a child for similar
> reasons).
>
>> Likewise, it does not really make much sense to talk about how popular
>> Lisp would be without parentheses.
>
> I see that now.
>
>
>> Speculations on how fundamental
>> the SEXP syntax is to Lisp (and why Dylan failed etc) aside, no one
>> has demonstrated the existence of an equally powerful Lisp with a more
>> "conventional" syntax, so what the experiment/counterfactual would be
>> is not clear.
>
> is it even possible to do something like Lisp's macros without SEXPs?

Certainly it is *possible*. It wouldn't be nearly as concise or pretty,
but it could be done. In, for example, Java the compiler could:

1) Lex/parse everything into a syntax tree
2) Encode that tress as a hierarchical Java object
3) Compile all "macro methods", which take as their argument a reference
to the AST of the code they're being run on
4) Execute the macros, recursing as necessary
5) Recurse to step 3 if necessary; some macros may expand into further
macro definitions
6) Finally compile the macro-expanded code into a class file

This is so awkward as to be unusable, but it is hardly impossible.

--
Cheers,
Alan (San Jose, California, USA)
From: Alan Malloy on
Tim Bradshaw wrote:
> On 2010-04-22 10:57:48 +0100, Nick Keighley said:
>
>> I also taught myself to stop doing this. perhaps if
>> I'd continued
>> Lisp would have made me less unhappy.
>
> I don't think so, because the parenthesis in Lisp serve a very different
> purpose (in "(if (< x 1) ... ...)", "(< x 1)" is not a parenthetical
> remark which can be skipped on first reading).
>

Sure it is. It expands on the meaning of the if statement. Try writing
it as "If some condition (in this case, x < 1) holds, I'll do something
(this time, evaluate a sub-form); otherwise I'll do something else (as
it happens, evaluate a different sub-form)".

If your reader didn't care about the details, and just wanted to
understand that you were doing something conditionally, the sentence
above could be stripped of all parenthetical clauses without harm: "If
some condition holds, I'll do something; otherwise I'll do something else".

--
Cheers,
Alan (San Jose, California, USA)
From: Pillsy on
On Apr 22, 11:45 am, His kennyness <kentil...(a)gmail.com> wrote:
> Pillsy wrote:
[...]
> > I did too. Actually, I discovered that I liked it almost immediately.
> > OTOH, I find C-descended syntaxes to be very uncomfortable. Part of
> > the reason I'm so convinced of the role that personal preference plays
> > in this is that my own preferences seem to be so radically different
> > from most other programmers.

> What makes you think most other programmers would not have the same
> result as yourself, viz. discover they like it almost immediately?

If that were the case, wouldn't we see Lispy syntaxes everywhere? Lots
of people are exposed to Lisp through intro CS courses or editing
Emacs configuration files, and writing a Lisp reader is pretty damned
easy. Even if people hate the dynamic typing or garbage collection,
they could still give their new languages all the parentheses you
could ever want.

Add to that people's #1 superficial complaint about Lisp is the
Legions of Irritating Stupid Parentheses, and I'm pretty sure I'm
right about this.

Cheers,
Pillsy
From: Tim Bradshaw on
On 2010-04-22 20:12:59 +0100, Alan Malloy said:

> If your reader didn't care about the details

Sorry, that's just silly. There are no cases where that form could
somehow be omitted without changing the meaning of the program (in fact
making it syntactically invalid). However the previous parenthetical
remark can be so omitted - and parenthetical remarks in written English
(such as this one) very often can.