ok or true? (fwd)
Mon Feb 23 23:10:08 CET 2004
----- Original Message -----
From: "Joe Armstrong" <>
Sent: Monday, February 23, 2004 11:54 AM
Subject: Re: ok or true? (fwd)
> Things that return two possible atoms should *always* return true | false.
> Why? - because there are loads of library routines which work on
> Suppose you have a function switch_status(...) what returns on | off.
> I'd *immediately* rename this as
> is_swich_on(...) or switchP(...) that returns true | false
Ah, but now you have changed the funtions to be boolean functions so then
they should naturally return booleans. For the oroiginal functions on|off is
More information about the erlang-questions