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

How do you avoid the parameters from getting bloated? Like having to pass the same dependencies into every method.


It's a judgement call to be sure. If I start seeing a pattern of adding a bunch of parameters I stop and rethink what I am doing. Usually there is a structural problem that can be fixed.


Maybe by using currying/partial application?




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

Search: