If it is like the example here and does something totally different, yes. Optional parameters are not bad in and of themselves. For example, say I want to write a function that clips unnecessary numbers (for display) off of the end of a decimal. (So 25.000000) becomes 25).
But, I want an optinal parameter to specify a minimum amount of digits past the decimal, which is default 0? Does the author really advocate writing two different functions for this? Of course he doesn’t. He really painted with a broad brush on this one.
Members
Online