[erlang-questions] Erlang 3000?

Bengt Kleberg bengt.kleberg@REDACTED
Mon Nov 17 09:20:39 CET 2008


Greetings,

Perhaps somebody would care to post another example since this one is 
very easy to make un-strange:

case X > 39 of
true ->
false ->
end


bengt
Those were the days...
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."


On 2008-11-17 01:36, Robert Virding wrote:
> 2008/11/17 damien morton <dmorton@REDACTED 
> <mailto:dmorton@REDACTED>>
> 
> 
>     So here's a question: Are there any examples of "if" statements that
>     would be awkward or difficult to express using a "case" statement?
> 
> 
> There is never a case when it would difficult to use case, just some 
> cases where it be awkward or look really strange:
> 
> case true of
>     true when X > 39 -> ...;
>     true -> ...
> end
> 
> instead of
> 
> if X > 39 -> ...;
>    true -> ...
> end
> 
> Robert
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list