By CodeJustin
via codeutopia.net
Published: Nov 12 2009 / 15:21
You need to add some new functionality to your function or class. Let’s say you need to remove all objects stored, but optionally also call a method on them.
It’s pretty simple, isn’t it? Let’s just add a parameter to removeAllObjects! If you make it true, the additional method is called, otherwise not.
Except it’s not really such a good idea at all…



Comments
CodeJustin replied ago:
A few simple but very helpful tips to keep in mind when using parameters.
Voters For This Link (10)
Voters Against This Link (0)