moving general-purpose functions from httpd_util to stdlib

Bengt Kleberg eleberg@REDACTED
Mon Apr 14 08:08:54 CEST 2003


> Date: Mon, 14 Apr 2003 00:01:55 -0500
> From: Chris Pressey <cpressey@REDACTED>
...deleted

> This brings up one of those burning questions of our times - that is,
> what exactly "defensive programming" means in the context of Erlang.
> 
> Say you have a function foo() that can return either an integer or the
> atom 'error'.

an alternative to this problem is described by Richard Carlsson:

		- 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.


bengt




More information about the erlang-questions mailing list