Jump to content

Null object: Difference between revisions

m
[Erlang] Format code clearly.
m ([Erlang] Fix atom list.)
m ([Erlang] Format code clearly.)
Line 271:
 
Example alternatives:
# Something like <pre>{ok, 3}</pre> or <pre>{err, no_more}</pre> on error.
# Don't ever allow an undefined return value, and throw an exception instead.
# Return an atom:
## <pre>undefined</pre>*
## <pre>undef</pre>
## <pre>null</pre>
## <pre>nil</pre>
## <pre>none</pre>
 
*<pre>undefined</pre> Oftenis often used by records as an initial value and the stdlib module.
 
Atoms are erlang's user-defined constants that always evaluates to is itself. It is also equal to no other value else but itself.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.