atoms used as status info, 'constants' etc

Steve Davis steven.charles.davis@REDACTED
Tue Aug 18 10:24:38 CEST 2009

Here's my 2c on this one.

1) reuse atoms that are also used as return values from other modules
in the OTP platform where it makes sense,
2) try to name the atoms cleverly for best grok-ability
3) if you return an unpredictable number of status values, then use
"string" status values
3a) and... by "string" then probably it is "better" to use a binary
representation of the text, e.g. <<"my unpredictable return value">>


On Aug 18, 2:27 am, Dave Pawson <dave.paw...@REDACTED> wrote:
> I'm using atoms as status value returns from functions.
> Is there any 'best practice' in this area?
>   In other languages I might keep them together as defined constants
> or some such?
> --
> Dave Pawson
> Docbook FAQ.
> ________________________________________________________________
> erlang-questions mailing list. See
> erlang-questions (at)

More information about the erlang-questions mailing list