Re: simple vs complex languages

Steve_Lipscombe@amat.com
27 Apr 2003 02:24:42 -0400

          From comp.compilers

Related articles
Re: simple vs complex languages Steve_Lipscombe@amat.com (2003-04-27)
Re: simple vs complex languages rpboland@math.uwaterloo.ca (Ralph P. Boland) (2003-04-27)
Re: simple vs complex languages alex_mcd@btopenworld.com (Alex McDonald) (2003-04-27)
Re: simple vs complex languages basile@starynkevitch.net (Basile STARYNKEVITCH) (2003-05-05)
Re: simple vs complex languages rafe@cs.mu.oz.au (2003-05-05)
Re: simple vs complex languages hat@se-46.wpa.wtb.tue.nl (Albert Hofkamp) (2003-05-06)
Re: simple vs complex languages Robert@Knighten.org (2003-05-06)
[38 later articles]
| List of all articles for this month |

From: Steve_Lipscombe@amat.com
Newsgroups: comp.compilers
Date: 27 Apr 2003 02:24:42 -0400
Organization: Compilers Central
Keywords: parse
Posted-Date: 27 Apr 2003 02:24:42 EDT
X-MIMETrack: Serialize by Router on EMAUSTGW02/APPLIED MATERIALS(Release 5.0.10 |March 22, 2002) at 04/23/2003 06:00:36 AM

Robert wrote


>The thing that bothers me about all this fancy parsing technology we
>have developed over the past few decades is that it is solving an
>artificial problem. If we didn't design our programming languages to
>have such doggone complicated syntax, then we would be happy to use
>hand-written recursive-descent parsers.
>...


And our moderator replied


>[I don't see why it's artificial. Human languages have very complex
>grammars. That's how we're wired to work. Why shouldn't computers
>adapt to us for a change? -John]


I'm with Robert on this one.


If a language is designed with a simple, consistent syntax then it is
not only easier for the compiler to parse, but (more importantly) it
is easier for humans to understand and therefore easier to get
right. Can you guess I like Pascal, which was designed from the outset
for a single pass RDP?


I'm no expert in these matters (then shut-up, they cried), but it
seems to me that to express complex ideas we need a rich vocabulary,
but not a complex syntax. And if not, then why do we do it?


Why make anything needlessly complicated? Just to prove how clever we are?


Human languages are too ambiguous for programming. They only work for
humans because we add redundant information, use context to resolve
ambiguities, or simply make assumptions (which sometimes/often turn
out wrong).


Human languages are complex and ambiguous not because we like them that
way, but because they have evolved from something simple. Like C++ :-)


Finally, if you want to program in a human language, try parsing this old
favourite:


        Time flies like an arrow, fruit flies like a banana.


Steve


Post a followup to this message

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