26 May
2013
26 May
'13
9:53 p.m.
Le 26/05/13 22:45, Gaetano Mendola a écrit :
On 26/05/2013 22.01, Vicente J. Botet Escriba wrote:
Would the base Latch class be public? if not, this is an implementation detail and is equivalent to having two classes but sharing a common implementation.
Well, not equivalent because with let say a boolean as parameter you need to check at runtime what to do (reset the counter or not) this way with a policy the choose is made a compile time, also implementing it with a boolean will force you to store anyway the original counter value, NoResetPolicy to the other side will be an empty class. I said "equivalent to having two classes". Best, Vicente