Re: APIs that have boolean arguments defaulting to true

On Mon, Nov 11, 2013 at 12:18 PM, Domenic Denicola <
domenic@domenicdenicola.com> wrote:

> My impression was that boolean arguments in general should be avoided.
> "The Boolean Trap", as it's called:
>
> ACK.
Boolean arguments indicated that the function does more than one thing.
They are also confusing.

In OOD, it violates method-SRP (MSRP?) (if such abstract OOD esoteria
matters to anyone else).

<greenfield>
 Instead, a second method.
 clone(),
 cloneDeep();
</greenfield>
-- 
Garrett
@xkit
ChordCycles.com

Received on Monday, 11 November 2013 21:15:47 UTC