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

The only time it is sensible to do this with variable names is when they are some form of logical progression, for example when threading a state variable through the code which may be modified.

  f(..., State0) ->
    {A,State1} = foo(..., State0),
    {B,State2} = bar(..., State1),
    {C,State3} = baz(..., State2),
    Res = fubar(A, B, C, ...),
    {Res,State3}.
Otherwise you just create confusion.


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

Search: