[erlang-questions] Which choice is better? Function or Case

Bengt Kleberg <>
Thu Mar 7 10:26:34 CET 2013


Greetings,

Another point in favor of functions is that they can be traced with
ttb/dbg module.

If you worry about code speed you can first make a simple,
understandable, solution, then time/profile it.


bengt

On Thu, 2013-03-07 at 17:11 +0800, 饕餮 wrote:
> I wonder if Function call is better than Case when both of they can
> implement the target I want?
> It seems like  write a function instead of case could make the code
> more clear .
> But which one is fast when it running? 
> I intend to change the case to function to make the code more clear.
> Is this valuable?
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list