Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!warwick!nott-cs!ucl-cs!news From: S.Clayman@cs.ucl.ac.uk Newsgroups: comp.lang.functional Subject: Re: concrete syntax (was: "off-side rule") Message-ID: <1386@ucl-cs.uucp> Date: 25 Jan 91 17:07:43 GMT Sender: news@cs.ucl.ac.uk Lines: 44 I have just read about 20 messages concerning off-side rules, white space having meaning etc... Firstly I would like to know how many of the people doing the criticism have actually USED a language with off-side rules. Secondly, languages aren't necessarily designed so that the compiler writer's task is made easier. Progamming language design should consider the users of the language; ease of expressing abstract ideas should be more important than how many minutes Eric Compiler-Writer saved when doing the parser. The most important thing I want to say is I have NEVER had a problem with off-side rules and white space introducing bugs, but I have introduced bugs in C programs by having single statements and then adding another statement at the same indentation thinking thaey are the same block of code. Having both lines indented to the same place has caused the confusion. I have just written a 2000 line Miranda program and off-side and white space aided me in the expression of my ideas, helped avoid silly errors, and made writing bug free code easier. Indentation is used for local definitions; if the compiler complained about things being off-side I went straight to them, and easily saw what the problems were. Also, i have been teaching students Miranda, they easily grasp the concept of left hand-sides and right hand-sides of expressions with local definitions to the right of the =. These are 1st years, some of whom have never seen a computer before. They can write working programs within a day, and have done complex projects after 1 term (e.g. text formatters, symbolic differentiators, stock control systems) They are now learning C; whose layout and syntax is not so easily learnt, and has a large syntactic overhead for the expressivness. I cant imagine any of the writing similar projects after 1 term of C. I would like to add that the Haskell approach of a formal translation to a form with no off-side is a good idea, someone somewhere is to be commended for that. stuart