3 ms·
Erlang & Single Assignment: You’re Doing It Wrong
- lg 18y agoEhh I disagree with point number 2. I've been writing a big app in Erlang lately and SA has actually made my program longer. i.e. rec(Lst) -> case Cond of pattern1 -> rec(Lst); pattern2 -> Lst2 = ... rec(Lst2); ... I'd like to rebind Lst in pattern2's clause and then just call rec(Lst) at the end of the case. (Of course there can be many more than 2 clauses and all the rec/1 calls really add up.)