Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!crackers!jjmhome!smds!rh From: rh@smds.UUCP (Richard Harter) Newsgroups: comp.lang.functional Subject: Re: "Off-side rule" Summary: What is the "off-side" rule Message-ID: <293@smds.UUCP> Date: 13 Jan 91 10:50:23 GMT References: <22307@rouge.usl.edu> <1991Jan10.111559.12440@odin.diku.dk> Organization: SMDS Inc., Concord, MA Lines: 26 In article , acha@CS.CMU.EDU (Anurag Acharya) writes: > In article <1991Jan11.100048.3121@odin.diku.dk> sestoft@diku.dk (Peter Sestoft) writes: > The main difference between Miranda (TM) and Lazy ML is the syntax. > In Miranda the program lay-out has semantics: the off-side rule > determines where an expression ends, whereas (Lazy) ML has more > Pascal-like conventions, using semicolons similar punctuation. (The > off-side rule was suggested by Peter Landin in the sixties). > What is the justification for this "off-side" rule ? The idea of whitespace > having semantics is a potential source of inscrutable bugs and, frankly > speaking, seems to go against the grain of modern programming language > design. Could some one post a summary explanation of the off-side rule, please? I am working with a language called Lakota which, like ICON, uses indentation for delimiting blocks, so the idea of layout being meaningful is familiar. However this is a syntactical use of white space rather than a semantic use, at least as far as I can see, and is not particularly novel. I would also be interested in hearing what the purported advantages of the off-side rule are. -- Richard Harter, Software Maintenance and Development Systems, Inc. Net address: jjmhome!smds!rh Phone: 508-369-7398 US Mail: SMDS Inc., PO Box 555, Concord MA 01742 This sentence no verb. This sentence short. This signature done.