🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6757

Re: Anyone want to design a languag

#6757
From: klietz
Date: Tue, 20 Feb 1990 17:42
49 lines
2020 bytes
> 1, 2, 3. No semicolons. End-of-line comments. Block structure indicated
>          by indentation.

Here is a proposal for how to use indentation to scope statement
and expression blocks.

Semicolons are terminators.  A newline is also a terminator if
the following line is not indented with respect to the rightmost
symbol on the current line that begins a new statement or expression
block. e.g. while or =.  Finally, a terminator within parenthesis has
no effect outside the scope of the parenthesis.

So, here is an example of a programs using these rules in a
C-like language.

    i = 0
    while (i < n) 
        k = f + a[i] * lagrange(i, j)
              + a[i+1] * lagrange(i+1, j)
              + a[i+2] * lagrange(i+2, j)
              + if (f > 0)
                  m = euler(f); gauss(m)
		else 0
        i = i + 3

    if (i > 0)
        f = f + 1; j = k; k = kolmogorov(k, j)
        h = ( do
                poisson(a[i+j])
	        g = f + ( alpha(x) + beta(x) + gamma(x)
+ delta(a) + epsilon(x) )
                abel(a[i+j])
	      while (i == j);
              g; )
     f = abs(h)

Use of curly braces { } is not needed.  It is obvious to the
reader when he sees ;) that the trailing parenthesis terminates a
statement and not an expression.

--
Alan E. Klietz
University of Illinois at Urbana-Champaign
National Center for Supercomputing Applications
152 Computing Applications Building
605 E. Springfield Avenue
Champaign, IL  61820
Ph: +1 217 244 8024	       Internet: aklietz@ncsa.uiuc.edu
Technical Details
Message-ID: <7300007@ux1.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!klietz
References: <1944@l.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!klietz
From: klietz@ux1.cso.uiuc.edu
Newsgroups: comp.lang.misc
Subject: Re: Anyone want to design a languag
Message-ID: <7300007@ux1.cso.uiuc.edu>
Date: 20 Feb 90 17:42:55 GMT
References: <1944@l.cc.purdue.edu>
Lines: 49
Nf-ID: #R:l.cc.purdue.edu:1944:ux1.cso.uiuc.edu:7300007:000:1518
Nf-From: ux1.cso.uiuc.edu!klietz    Feb 20 10:32:00 1990