DISQUS

DISQUS Hello! evand.org is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

evand.org

Evan DiBiase's blog
Jump to original thread »
Author

Reuse vs. Use Once

Started by Evan DiBiase · 11 months ago

Brent Simmons just put a post up on his design philosophy for category methods, in which he presents the following rule:

If something is used just once, don’t make a category for it, just make it a static C function. Unless it’s big.
His reasoning is as follows:
Less code to maintain. (And, in this case, two fewer [...] ... Continue reading »

1 comment

  • This philosophy reminds me of the agile programming maxim of "do the simplest thing that could possibly work, then iterate". The key thing is to remember that this not-quite-general functiuon exists, so when you need it again in a few more places, you remember to go back and refactor it, rather than re-implementing it again..

Add New Comment

Returning? Login