🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #731

Re: "Off-side rule"

#731
From: Richard Harter
Date: Sun, 13 Jan 1991 10:50
26 lines
1953 bytes
In article <ACHA.91Jan11151418@DRAVIDO.CS.CMU.EDU>, 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.
Technical Details
Message-ID: <293@smds.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!crackers!jjmhome!smds!rh
References: <22307@rouge.usl.edu> <1991Jan10.111559.12440@odin.diku.dk> <ACHA.91Jan11151418@DRAVIDO.CS.CMU.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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> <ACHA.91Jan11151418@DRAVIDO.CS.CMU.EDU>
Organization: SMDS Inc., Concord, MA
Lines: 26