3 ms·
If the duck type is going to be checked, it should be checked when the child is added. Ensures you only call #respond_to? once per node, fails earlier. Checking
by djur 12y ago
If the duck type is going to be checked, it should be checked when the child is added. Ensures you only call #respond_to? once per node, fails earlier. Checking types during a computation is a code smell to me.