Re: Is the dangling else a syntax bug?

vbdis@aol.com (VBDis)
27 Jul 2001 03:01:34 -0400

          From comp.compilers

Related articles
[12 earlier articles]
Re: Is the dangling else a syntax bug? genew@shuswap.net (2001-07-17)
Re: Is the dangling else a syntax bug? toon@moene.indiv.nluug.nl (Toon Moene) (2001-07-18)
Re: Is the dangling else a syntax bug? esmond.pitt@bigpond.com (Esmond Pitt) (2001-07-18)
Re: Is the dangling else a syntax bug? jcrens@earthlink.net (Jack Crenshaw) (2001-07-23)
Re: Is the dangling else a syntax bug? marcov@toad.stack.nl (2001-07-23)
Re: Is the dangling else a syntax bug? joachim_d@gmx.de (Joachim Durchholz) (2001-07-23)
Re: Is the dangling else a syntax bug? vbdis@aol.com (2001-07-27)
Re: Is the dangling else a syntax bug? wb@vestein.arb-phys.uni-dortmund.de (2001-07-30)
Re: Is the dangling else a syntax bug? mike@dimmick.demon.co.uk (Mike Dimmick) (2001-07-30)
Re: Is the dangling else a syntax bug? wclodius@aol.com (2001-07-30)
Re: Is the dangling else a syntax bug? joachim_d@gmx.de (Joachim Durchholz) (2001-07-30)
Re: Is the dangling else a syntax bug? marcov@toad.stack.nl (2001-08-02)
Re: Is the dangling else a syntax bug? vbdis@aol.com (2001-08-02)
[1 later articles]
| List of all articles for this month |
From: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 27 Jul 2001 03:01:34 -0400
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 01-07-133
Keywords: syntax
Posted-Date: 27 Jul 2001 03:01:34 EDT

"Joachim Durchholz" <joachim_d@gmx.de> schreibt:


>An interesting variation of this is the use of unindentation as "end"
>marker. This has been done e.g. in Python and Haskell.


Did you ever see source code with a mix of tab and space characters?
Such text becomes unreadable to both a human and a compiler, when the
tab size is changed to some user defined value. The whole source code
then is bound to a specific editor :-(


But perhaps I misunderstood your point. When the editor inserts the
appropriate End keyword whenever a line is outdented, then everything
is okay. But then it's a feature of the editor, not of the language.


The use of EOL as a delimiter was discussed in a recent thread, and I
think that it's not a practical solution. Then at least continuation
lines must be introduced at the same time, to allow to break long
lines into multiple shorter lines.


Line breaks can cause problems, as I just had with Delphi and Unix
source files. The compiler complained about too long lines, whereas
the editor displayed the \n (without \r) as line ends. IMO we should
leave the use of line breaks and indentation to the human user, and
let the compiler ignore white space, control characters, and comments.


DoDi
[Line-oriented languages with continuation markers work fine. I used
to use one, For-something. -John]



Post a followup to this message

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