Re: simple vs complex languages

"Alex McDonald" <alex_mcd@btopenworld.com>
27 Apr 2003 17:13:35 -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)
Re: simple vs complex languages scott.moore6@attbi.com (Scott Moore) (2003-05-06)
Re: simple vs complex languages tmk@netvision.net.il (2003-05-06)
[36 later articles]
| List of all articles for this month |

From: "Alex McDonald" <alex_mcd@btopenworld.com>
Newsgroups: comp.compilers
Date: 27 Apr 2003 17:13:35 -0400
Organization: BT Openworld
References: 03-04-095
Keywords: parse, design
Posted-Date: 27 Apr 2003 17:13:35 EDT

> 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.


<Steve_Lipscombe@amat.com> wrote
> 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?


Try Forth, a language that proves your point. Almost no syntax
whatever (RPN), and parsing is reduced to spotting the white space
between words. Complex words are expressed in terms of simpler words;
most Forths have a very few atomic words on which the rest are built.


===snipped


>
> 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


I can't resist my favourite:


"The only spectators were a woman holding a baby and a policeman."


--
Regards
Alex McDonald


Post a followup to this message

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