Related articles |
---|
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cef@geodesic.com (Charles Fiterman) (1995-04-19) |
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-04-28) |
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-05-09) |
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-05-11) |
Re: The semicolon habit (was: Q: Definition sys3bga@doc.ntu.ac.uk (1995-05-05) |
Re: The semicolon habit (was: Q: Definition stidev@gate.net (1995-05-09) |
Re: The semicolon habit (was: Q: Definition plong@perf.com (1995-05-09) |
Re: The semicolon habit (was: Q: Definition everettm@walters.East.Sun.COM (1995-05-11) |
Re: The semicolon habit (was: Q: Definition schrod@iti.informatik.th-darmstadt.de (1995-05-12) |
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) |
[9 later articles] |
Newsgroups: | comp.compilers |
From: | sys3bga@doc.ntu.ac.uk (Gaster) |
Keywords: | syntax |
Organization: | The Nottingham Trent University (Computing) |
References: | 95-04-147 95-04-201 |
Date: | Fri, 5 May 1995 12:50:37 GMT |
Mark Lutz (lutz@KaPRE.COM) wrote:
: Charles Fiterman <cef@geodesic.com> writes:
: >[use indentation to show block structure]
: I caught this discussion late, so forgive me if this has already
: been mentioned. But if you're interested in seeing an example
: of a language where blocks are based on indentation, and lines
: don't need explicit terminators, have a look at Python, a newer
: object-oriented scripting/extension language.
I also caught this discussion late, but the idea of using indentation to
describe the layout or programs, has been used well in functional languages
for a number of years. Further more the modern functional language Haskell
allows the programmer to mix both {} and semi-colon's to describe layout
or use what is know as the offside rule (originally proposed by Landin).
The offside rule allows the braces and semi-colons to implicit instead of
emplicit, through the use of indentation. For more details (including a full
specification of the offside rule used in Haskell) see the Haskell 1.2
report:
@ARTICLE{hudak,
AUTHOR = "P. Hudak and S. Peyton Jones and P. Walder (editors)",
TITLE = "Report on the Programming Language Haskell. A Non-strict Pure
ly Functional Language (Version 1.2)",
JOURNAL = "ACM SIGPLAN Notices",
VOLUME = 27,
NUMBER = 5,
YEAR = "May 1992"}
anonymous ftp ::: ftp.cs.nott.ac.uk
/pub/haskell/report/report-1.2.ps.Z
Ben.
--
Benedict R. Gaster
Nottingham Trent University
sys3bga@doc.ntu.ac.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.