nmm1 at cus.cam.ac.uk
Mon Apr 10 10:36:22 CEST 2000
In article <38F13CA1.1A91D85 at mindspring.com>,
Chuck Esterbrook <echuck at mindspring.com> wrote:
>Nick Maclaren wrote:
>> To the several people who suggested:
>> (a() and [b()] or [c()])
>> Thank you for the suggestion. I have occasionally used perversities
>> like that (such as '*(x ? &a : &b) = y;' in C to mimic the Algol 68
>> facility), but I don't regard them as clarifying the code, either!
>OK, so what does the Algol 68 code look like for that C code and any other interesting cases?
If I remember correctly (and I may well be misremembering), an Algol 68
unit could return a name and not just an expression - i.e.:
(a | b | c) := y;
if a then b else c fi := y;
However, I may be getting confused with which language it was. As I
said, it is not a construction that I regard as particularly clear,
and therefore almost never used it. I use the expression form very
heavily, in any language that has it, because so many operations are
precisely that construction.
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the Python-list