From: | Martin Rodgers <mcr@wildcard.demon.co.uk> |
Newsgroups: | comp.compilers |
Date: | Fri, 14 Jan 2011 10:50:29 +0000 |
Organization: | Compilers Central |
References: | 10-12-040 10-12-043 11-01-005 11-01-025 11-01-038 11-01-041 |
Keywords: | design |
Posted-Date: | 15 Jan 2011 00:18:02 EST |
glen herrmannsfeldt wrote:
> Now, why do some languages have DO ... UNTIL, where others have
> DO ... WHILE for "test at the end" loops?
I've always prefered languages that have both. I picked on a specific
Basic dialect because that was the example that irritated me the most.
*My* experience of Basic was mainly with another dialect that had
neither WHILE mor REPEAT - you had to use IF/GOTO or FOR.
BBC Basic was also irritating to me because, unlike the earlier Basic
implementations that I knew on on micros, the ROM was large enough
to support both control structures, so why pick just one?
So I can only guess why the implementers made that choice. To be fair,
a lot of choices made in Basic implementation of that era seem bizzarre
to me today. They seemed pretty odd to me at the time, but I learned a
lot about the pitfalls of language design by studying them, so at least
they had some value for me. It's a small design space, but that may have
helped me - at some point, language design comes down to the very
small details that will matter to programmers and implementers. I can
recommend this technique to anyone interested in language design - study
entire families of dialects, their evolution, their implementions, the costs
and trade-offs made, the context(s) and general family history.
Looking at the subject for this thread, I might suggest starting with the
Algol family. ;)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.