|Current work in compiler/language design. hackeron@Athena.MIT.EDU (Harris L. Gilliam - MIT Project Athena) (1991-11-10)|
|Syntax andy@SAIL.Stanford.EDU (1991-11-27)|
|Re: Syntax firstname.lastname@example.org (1991-12-03)|
|Re: Syntax email@example.com (1991-12-04)|
|Re: Syntax firstname.lastname@example.org (Raul Deluth Miller-Rockwell) (1991-12-05)|
|Re: Syntax email@example.com (1991-12-05)|
|Re: Syntax firstname.lastname@example.org (Eric A. Anderson) (1991-12-05)|
|Re: Syntax email@example.com (1991-12-05)|
|Re: Syntax firstname.lastname@example.org (1991-12-04)|
|From:||email@example.com (Dan Salomon)|
|Organization:||Computer Science, University of Manitoba, Winnipeg, Canada|
|Date:||Wed, 4 Dec 1991 20:46:18 GMT|
In article 91-12-012 firstname.lastname@example.org (Dale R. Worley) writes:
> In article 91-12-004 andy@SAIL.Stanford.EDU (Andy Freeman) writes:
> [...] the "infix" languages don't agree on
> precedence because people don't, at least for operators other than *, +,
> -, and /. (BTW - There isn't even agreement on how consecutive - and /s
> are grouped.)
> It's worse than that -- in Snobol 4, "-" has a lower precedence than
> "+", that is, "a + b - c + d" is parsed as "(a + b) - (c + d)".
> Similarly for "*" and "/".
These arguments are getting off the topic. The original poster said that
infix is more natural than prefix, NOT that it is more precise. Usually
arguments about the "naturalness" of programming language constructs are a
waste of time, since our understanding of human psychology is still very
superficial and subjective. In addition, with enough training almost any
language can be made to seem natural.
I must point out, however, that since we have been trained in infix
notation starting in grade one, we can only expect most programmers to
find infix notation more natural. In any case, infix is more concise than
prefix since it usually requires fewer parentheses. In addition, it is
fairly easy to show that humans are not very good at matching parentheses
beyond a about three levels.
Many programmers hate LISP, and hate it passionately. In expressing their
distaste for it they have no choice but to express it in undefendable
terms of its naturalness. This gives the LISP supporters, and there are
many, a wide open field to find flaws in the attacks.
Return to the
Search the comp.compilers archives again.