Re: The semicolon habit (was: Q: Definition

cbloom@utxvms.cc.utexas.edu (CHARLES BLOOM)
Sat, 1 Jul 1995 21:49:20 GMT

          From comp.compilers

Related articles
[9 earlier articles]
Re: The semicolon habit (was: Q: Definition anw@maths.nottingham.ac.uk (Dr A. N. Walker) (1995-05-16)
Re: The semicolon habit (was: Q: Definition cef@geodesic.com (Charles Fiterman) (1995-05-17)
Re: The semicolon habit (was: Q: Definition reid@HASKELL.SYSTEMSZ.CS.YALE.EDU (1995-05-16)
Re: The semicolon habit (was: Q: Definition jan@neuroinformatik.ruhr-uni-bochum.de (1995-06-24)
Re: The semicolon habit (was: Q: Definition tim@handel.Princeton.EDU (1995-06-24)
Re: The semicolon habit (was: Q: Definition bevan@cs.man.ac.uk (1995-06-30)
Re: The semicolon habit (was: Q: Definition cbloom@utxvms.cc.utexas.edu (1995-07-01)
Re: The semicolon habit (was: Q: Definition plong@perf.com (Paul Long) (1995-07-05)
Re: The semicolon habit (was: Q: Definition tim@debusy.Princeton.EDU (1995-07-05)
Re: The semicolon habit (was: Q: Definition bertrand@eiffel.com (Bertrand Meyer) (1995-07-10)
Re: The semicolon habit (was: Q: Definition jan@neuroinformatik.ruhr-uni-bochum.de (1995-07-13)
| List of all articles for this month |

Newsgroups: comp.compilers
From: cbloom@utxvms.cc.utexas.edu (CHARLES BLOOM)
Keywords: syntax, design
Organization: University of Texas @ Austin
References: 95-04-193 95-06-092
Date: Sat, 1 Jul 1995 21:49:20 GMT

[ semicolon vs. indentation-sensitive ] :


Why not making it an option? Like so:


if a semi-colon appears, the compiler reads that as "end-of-line" and
starts processing a new line.
if a '\n' (newline) appears, the compiler also reads that as
    "end-of-line".


This means that I could write C like:


i++
j = i +1
for(i=0
        i<5
        i++)
    { j = i-1; zx = log2(j); }


etc...


Looks pretty cool to me. Is there a reason why not to do this?


Charles Bloom
cbloom@micom.com
--


Post a followup to this message

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