3 ms·
Regarding your example using default params - this is the same argument (http://weblog.therealadam.com/2013/01/03/design-for-test-vs-design-for-api/ http://webl
by swanson 14y ago
Regarding your example using default params - this is the same argument (http://weblog.therealadam.com/2013/01/03/design-for-test-vs-design-for-api/ http://weblog.therealadam.com/2013/01/03/design-for-test-vs-...) that DHH is addressing in this blog post.
Adam's post does raise an interesting point about the "mass" of the function. Since `publish!` now has parameters, the public API is more complex. Whether or not this trade-off is worth it or not will probably have to be evaluated on a case-by-case basis, methinks.
- pacala 14y agoThe APIs are exactly the same. One is explicit, reading its signature is enough to understand what it does, the other one is implicit, requiring reading the method body. The implicit version readability mass increases fast as it makes further transitive calls, which are now all required reading. The explicit version mass is always constant: the signature.