Re: simple vs complex languages

"Alex McDonald" <>
27 Apr 2003 17:13:35 -0400

          From comp.compilers

Related articles
Re: simple vs complex languages (2003-04-27)
Re: simple vs complex languages (Ralph P. Boland) (2003-04-27)
Re: simple vs complex languages (Alex McDonald) (2003-04-27)
Re: simple vs complex languages (Basile STARYNKEVITCH) (2003-05-05)
Re: simple vs complex languages (2003-05-05)
Re: simple vs complex languages (Albert Hofkamp) (2003-05-06)
Re: simple vs complex languages (2003-05-06)
Re: simple vs complex languages (Scott Moore) (2003-05-06)
Re: simple vs complex languages (2003-05-06)
[36 later articles]
| List of all articles for this month |

From: "Alex McDonald" <>
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.

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


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

Alex McDonald

Post a followup to this message

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