[erlang-questions] erlang sucks

Sean Hinde sean.hinde@REDACTED
Tue Mar 11 20:18:15 CET 2008


On 11 Mar 2008, at 12:47, Mats Cronqvist wrote:

>
> * 'if' is  completely worthless, and should ideally be obsoleted.

No, no no! I like 'if' It allows some neat constructs that are  
horrible with case.

Counting 'if' and 'case' for one of the apps in our codebase gives  
this result:

alex:src sean$ grep -v '^[[:space:]]*\($\|%\)' $(find . -name "*rl") |  
grep " if " | wc -l
      345
alex:src sean$ grep -v '^[[:space:]]*\($\|%\)' $(find . -name "*rl") |  
grep " case " | wc -l
     1052

~ one quarter of branching constructs are 'if'. Not at all  
insignificant.

Sean




More information about the erlang-questions mailing list