31 Jan
2000
31 Jan
'00
10:29 p.m.
On Mon, 31 Jan 2000 gvwilson@nevex.com wrote:
So I asked Simon Peyton-Jones and Phil Wadler how languages other than C and its derivatives did conditional expressions; one of the replies was:
On Mon, 31 Jan 2000, Philip Wadler wrote:
Tony Hoare had a nice ternary `if'. He writes
if c then d else e
as
d <c> e
Wait -- how the heck is this supposed to parse if 'c' is an arbitrary expression? I think we've run out of bracket-like thingies. (Yes, that would be the technical term). It also looks pretty opaque -- even if you do intuit that it's ternary-select (which i wouldn't if you hadn't told me) it still isn't really obvious which side is which. -- ?!ng