Sujet : Re: Loops (was Re: do { quit; } else { })
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.cDate : 20. Apr 2025, 17:01:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250420190125.00001d93@yahoo.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Sun, 20 Apr 2025 16:25:14 +0100
bart <
bc@freeuk.com> wrote:
That's what I'm asking! BCPL, an older and more primitive language
than the other two, has such a 'for' as described above:
FOR N = E1 TO E2 DO
It seems to have been dropped by B, which has only 'while', until C
introduced a souped-up, 3-element version of 'while', named 'for'.
I never knew either BCPL or B, but from what I am reading, B is more
primitive of the two. B was a simplified BCPL. BCPL itself was
simplified CPL. CPL was so complicated that it took approximately 10
years from definition to 1st implementation.
Clearly the author of both (Ken Thompson) had no great love for
'for'-loops; real ones.
Ken Thompson was not an author of C. No doubts that Thompson
influenced it, but still C is Ritchie's language.
You can probably say that Dennis Ritchie was an author of both
languages, even if he joined Thompson on later stages of design and
implementation of B.
The second language of Ken Thompson is Go which he co-authored with
Robert Griesemer and Rob Pike almost 40 years after B.