Related articles |
---|
Is the dangling else a syntax bug? vbdis@aol.com (2001-06-28) |
Re: Is the dangling else a syntax bug? ralph@inputplus.demon.co.uk (2001-07-02) |
Re: Is the dangling else a syntax bug? lhp+news@toft-hp.dk (2001-07-03) |
Re: Is the dangling else a syntax bug? vbdis@aol.com (2001-07-03) |
Re: Is the dangling else a syntax bug? ralph@inputplus.demon.co.uk (2001-07-06) |
Re: Is the dangling else a syntax bug? ralph@inputplus.demon.co.uk (2001-07-06) |
Re: Is the dangling else a syntax bug? gsc@zip.com.au (Sean Case) (2001-07-06) |
Re: Is the dangling else a syntax bug? lars@bearnip.com (2001-07-06) |
Re: Is the dangling else a syntax bug? vbdis@aol.com (2001-07-17) |
[17 later articles] |
From: | lhp+news@toft-hp.dk (Lasse Hillerĝe Petersen) |
Newsgroups: | comp.compilers |
Date: | 3 Jul 2001 23:14:30 -0400 |
Organization: | Posted through some European Outpost of TDC Internet A/S |
References: | 01-06-073 01-07-020 |
Keywords: | syntax, design, comment |
Posted-Date: | 03 Jul 2001 23:14:30 EDT |
ralph@inputplus.demon.co.uk (Ralph Corderoy) wrote:
>In favour of terminators are their similarity to the normal termination
>of written English sentances. I don't leave the full stop off the last
>sentance in this paragraph.
On the other hand, most languages _do_ use the comma (and perhaps
semicolon) as a separator. In any case, comparison with natural
language is rather futile, as you rarely have nested periods.
However, in natural languages, omitting a comma is rarely a cause for
misunderstanding, whereas in programming languages it is almost always
considered a syntactic error. Few languages make the semicolon
optional (I don't consider line-oriented languages in that group); I
believe Turing is one of them. Is there any evidence that using such a
grammar is more error-prone, or is it just because it makes it harder
to write a parser?
-Lasse
[I think I've seen stats that users get statement separators wrong more
often than statement terminators, but I can't dig them up at the moment.
-John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.