Try/Cond

Richard Carlsson richardc@REDACTED
Tue Oct 21 20:43:50 CEST 2003


----- Original Message ----- 
From: "Sean Hinde" <sean.hinde@REDACTED>
To: "Erlang Questions" <erlang-questions@REDACTED>
Sent: Tuesday, October 21, 2003 8:25 PM
Subject: Try/Cond


> I have heard and read much about the possible arrival of try/cond to
> the language. Can anyone shed any light on how it would be intended to
> work?

Basically, like "if" but with any boolean expressions instead of just
guards.
(I once tried to suggest that the if-expression should be generalized,
instead of
adding a keyword like "cond", but that sort of change scared too many
people.)

The current status is that it turned out that Erlang's scoping rules made it
harder
than we had expected to implement "cond" correctly (i.e., it's not just a
trivial
expansion into a nested case statement), so it was postponed until someone
with a lot of spare time could have another look at it.

    /Richard




More information about the erlang-questions mailing list