Re: language design tradeoffs

anw@maths.nott.ac.uk (Dr A. N. Walker)
Wed, 16 Sep 1992 13:21:26 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: language design tradeoffs raveling@Unify.com (1992-09-11)
Re: language design tradeoffs weberwu@inf.fu-berlin.de (1992-09-13)
Re: language design tradeoffs rob@guinness.eng.ohio-state.edu (1992-09-14)
Re: language design tradeoffs tmb@arolla.idiap.ch (1992-09-14)
Re: language design tradeoffs macrakis@osf.org (1992-09-15)
Re: language design tradeoffs jlg@cochiti.lanl.gov (1992-09-15)
Re: language design tradeoffs anw@maths.nott.ac.uk (1992-09-16)
Re: language design tradeoffs drw@euclid.mit.edu (1992-09-16)
Re: language design tradeoffs rob@guinness.eng.ohio-state.edu (1992-09-17)
Re: language design tradeoffs bromage@mullauna.cs.mu.OZ.AU (1992-09-17)
Re: language design tradeoffs jch@rdg.dec.com (1992-09-17)
Re: language design tradeoffs firth@sei.cmu.edu (1992-09-17)
Re: language design tradeoffs nickh@CS.CMU.EDU (1992-09-17)
[25 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers,comp.human-factors
From: anw@maths.nott.ac.uk (Dr A. N. Walker)
Organization: Maths Dept., Nott'm Univ., UK.
Date: Wed, 16 Sep 1992 13:21:26 GMT
References: 92-09-048 92-09-070
Keywords: design

rob@guinness.eng.ohio-state.edu (Rob Carriere) writes:
> [... make ] the statement
>inside the if/do a block; i.e. always use {} or BEGIN/END or whatever it's
>called in the language of the week.
>
>In fact, I would argue that a language that requires coding that way has
>superior syntax to a do/od language, because of the well-known problem
>with the spelling of the terminators. [...]


But syntactically it really doesn't matter whether the "if"
statement looks like:


if this then that fi
if this then that endif
if this then begin that end
if (this) { that; }


or whatever; they are all just different ways of spelling delimiters.
Of course, it may (well) affect human readability, and it may (well)
affect the quality of error diagnostics; and if symbols are overloaded
the lexer may have difficulty recognising "){" as "then".


The real distinction is in a mind-set. There are those who think
of the controlled *statement* of an "if"; and those who think of the
controlled *block* of an "if". There are so many problems with statements
in such contexts that blocks are clearly superior; it is a pity that
most of the popular languages use statements.


--
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw@maths.nott.ac.uk


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.