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

Too often I see functions that are shells that reshuffle the arguments and pass them to another function, which also reshuffles the arguments and forwards them to another, and on and on. One was 11 layers deep.


I have seen such code too - with just S,K and I combinators. It wasn't readable.


And a lot of people doesn't understand how dangerous shuffling parameters is, especially in languages that do not have named parameters...


Powershell is an awful language but it has made me fall in love with named parameters. Name all the things.


If you have a 2-4 line function and you spot this, you can trivially remove it.




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

Search: