Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're not matching on variable numbers of arguments, you can just have 1 function sig and a case statement.

The thing I dislike most about erlang, besides the lack of a good macro system, is that the repl is full of annoying special cases, so you have to actually stick your code in a file with a proper module name and compile it in order to test stuff :(



Pattern matching with functions is more 'idiomatic' Erlang, though, than case statements. At least that's what I've seen.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: