exported variables (was: RE: How to make GS Widgets)
Sun Apr 18 00:39:11 CEST 2004
At 10:59 PM 4/17/04 +0200, Ulf Wiger wrote:
>>I assume you intended another clause for the non-valid
>>cases to avoid the program failing with bad_match:
>Actually, no, but I was aware of the fact that by doing so,
>I changed the semantics of the code.
Oh, I was trying to reproduce the same semantics in
a different way so that the original poster could compare
>I usually don't silently transform illegal input to default
>values, especially not in early versions. I find that it is
>almost always better to let the program fail in those
>cases. And function_clause is a perfectly good way to fail,
I agree wholeheartedly with that approach.
More information about the erlang-questions