Article View: comp.std.c
Article #4002Re: Situation indicators (long) (was: How to eliminate GOTO?)
From: Tony Bass
Date: Fri, 15 Sep 1995 12:23
Date: Fri, 15 Sep 1995 12:23
43 lines
2550 bytes
2550 bytes
From article <43a5ij$s2b@news0.rain.rg.net>, by Paul Long <plong@perf.com>:
> In article 435n1u$bho@mujibur.inmind.com, mfinney@inmind.com writes:
>>In <4321kd$cne@news0.rain.rg.net>, Paul Long <plong@perf.com> writes:
[...]
>>This "one way and one way ONLY to do something" is directly
>>opposed to the concept of semantic richness. I would rather
>>have several variants of a control structure so that I can choose
>>the one that is "just right" rather than have to always work
>>around the ONLY thing provided.
>
> You'd like PL/I. A problem with a "rich" language is that dialects are formed.
> In practice, a language like this turns into a set of related dialects. We use
> a small subset of the language and continue to use just that subset because we
> are familiar with it. A programmer who speaks one dialect may not understand
> another dialect. The guy that we hire who knows language X may not understand
> our use of language X because he knows X' and we use X'', and their
> intersection may be minimal.
I had an example once with a Pascal program I had written in which all
the sorts of loop occurred: for-to, for-downto, while, repeat-until.
In preparation for porting to other languages I was rewriting it to use
only two sorts of loop: for-to and while. To my surprise at the time,
after I had finished restructuring the logic I felt the result was
simpler and cleaner and shorter.
Perhaps there are situations in which multiple control structures meet a
diversity of need, but in general I feel that working with a small but
adequate vocabulary of control structures leaves me free to concentrate
on more important matters, and saves me from occasional awkward
decisions on which of several competing control structures to choose.
Tony Bass
--
# Tony Bass Tel: (01473) 645305
# MLB 3/19, BT Laboratories e-mail: aeb@saltfarm.bt.co.uk
# Martlesham Heath, Ipswich, Suffolk, IP5 7RE DO NOT e-mail to From: line
# Opinions are my own
Technical Details
Message-ID:
<43br7f$o5i@calf.saltfarm.bt.co.uk>Path:
arc1-ca.pugleaf.net!calf.saltfarm.bt.co.uk!not-for-mailReferences:
<43a5ij$s2b@news0.rain.rg.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!calf.saltfarm.bt.co.uk!not-for-mail From: aeb@calf.saltfarm.bt.co.uk (Tony Bass) Newsgroups: comp.std.c Subject: Re: Situation indicators (long) (was: How to eliminate GOTO?) Date: 15 Sep 1995 13:23:11 +0100 Organization: BT Speech Technology Section Message-ID: <43br7f$o5i@calf.saltfarm.bt.co.uk> References: <43a5ij$s2b@news0.rain.rg.net> Reply-To: aeb@saltfarm.bt.co.uk NNTP-Posting-Host: calf.saltfarm.bt.co.uk