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

Early on at the company I'm at now they decided to exclusively use $params for param passing to functions as the one true way to do things. It supports easy default params, named params, an easy passing of config through to deeper layers without needing to know about it at intermediate layers.

What it doesn't support is any sort of readability as a code base scales. It's often hard to know how the function you're calling will behave because the param can tweak some flag and totally change the behavior.



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

Search: