It's not wasteful, it is just putting the "logic" into the pattern matching at the function selection level. In Erlang you can usually take the first level of case/if statements or arg parsing and put them into the function definition. You do end up repeating certain patterns when defining the function head, but it lets you get away with a lot less repetition in the body of the function.
Different strokes I guess, but in my experience I found myself repeating code a lot less in Erlang due to the functional nature of the language and because it made certain bits of repetition in the code more obvious due to the "shape" of code in my editor.
Different strokes I guess, but in my experience I found myself repeating code a lot less in Erlang due to the functional nature of the language and because it made certain bits of repetition in the code more obvious due to the "shape" of code in my editor.