Re: language syntax design, was Why context-free? (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
14 Oct 2005 17:20:05 -0400

          From comp.compilers

Related articles
Why context-free? (2005-10-06)
Re: Why context-free? (Robert A Duff) (2005-10-07)
Re: Why context-free? (Darius Blasband) (2005-10-13)
Re: language syntax design, was Why context-free? (2005-10-14)
| List of all articles for this month |

From: (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
Newsgroups: comp.compilers
Date: 14 Oct 2005 17:20:05 -0400
Organization: Department of Computer Science, University of Copenhagen
References: 05-10-053 05-10-061 05-10-083
Keywords: design
Posted-Date: 14 Oct 2005 17:20:05 EDT

Darius Blasband <> writes:

> Shouldn't the question be whether it would have been possible to design
> a language as productive as Perl, perhaps with a similar syntax in many
> areas, but which would have been CF or even LL1 ?
> [Python has a much cleaner syntax than perl, but never got perl's critical
> mass. I think this tells us that syntactic elegance isn't a big issue for
> language users. -John]

That could well be true. How else could a syntactic abomination like
C++ ever gain popularity?

I guess most users of languages with complicated rules use only a
small subset of the language where they don't get confused about the
syntax and only occasionally (if at all) "break out" of this small

So, perhaps, the negative impact of complicated syntax isn't so much
reduced productivity as:

  - Occasional unexpected behaviour when the compiler reads a
      programmer typo as correct syntax that is just different from what
      the programmer intended.

  - Inconsistent behaviour of different compilers due to different
      interpretations of what the syntax rules actually are.

  - Increased complexity of source code tools such as code analysers,
      program transformations, pretty printers etc.

And just about the only advantage is the ability to write really
obfuscated code. And _possibly_ a slight increase in code density,
but there are other factors that are much more important for this than


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.