ok or true? (fwd)

Bengt Kleberg <>
Mon Feb 23 13:44:19 CET 2004


Thomas Lindgren wrote:

> ...deleted
>
>Come to think of it, this raises a question: why do
>the standard libraries not make more use of
>exceptions?
>  
>
this depends upon _which_ standard libraries one uses :-)
i recommend the package_libs(.tar.gz) bundle from ''richardc''.

it has better functions, more consistent names and is built with the 
following conventions:

''    Return values in general

        - A function should *not* return wrapped values like
          {ok,Value}/{error,Reason} to indicate success or
          failure. The assumed behaviour should be success,
          and failures should be signalled by exceptions,
          as described below.

        - A function which is evaluated for its side effects
          only should always return the atom 'ok'; this is
          the typical Erlang "void" value.
''


bengt

This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.




More information about the erlang-questions mailing list