Hacker News new | past | comments | ask | show | jobs | submit login

I think the example is a bit grey.

In my opinion, function should list its dependencies and allow changing them. Having said that I dont believe the `is_ci` decision should happen in the function. The decision should happen at the entrypoint and it should drive which implementations the code will use for the dependencies.

I would look for the reason of rot in making the function become the merge point of multiple context, not the default values per-se. Whether default arguments make merging multiple contexts in a single function easier - code reviews might help here.

In any case, very good example




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

Search: