Hi,
i looked at a method in a package i downloaded that goes essentially
like this:
method:aCollection
aCollection do:[:i| i satisfiesTest ifTrue[^someNumberDependingOnI] ].
^someOtherNumberDependingOnACollection
now theoretically some 'i' should always satisfy test, the
^someOtherNumber was obviously added because there is a bug in
satisfiesTest and this way the bug is hardly noticable any more (its not
important for my question, but someOtherNumber is perfectly logical in
the general setting, if one does not understand the bug itself). i
changed satisfiesTest so that there should be no more bugs in it. of
course i cant be sure, hence i changed the ^someOtherNumber line to:
self error:'should never be reached'.
now i wonder whether that last error line would be considered a dirty
hack by the usual smalltalk programmer, and if yes, what would be the
usual procedure in such a case?
werner