[Pharo-users] Defensive programming or not
kasper.osterbye at gmail.com
Mon Sep 23 04:18:53 EDT 2019
In trying to fix one of the issues in Pharo, I came to wonder about the
prefered style in in dealing with preconditions to methods in Pharo.
In the method Random>>nextInt: anInteger
- There is a check if anInteger is negative
- There is no check that anInteger is anInteger
When should I put a guard there, and throw an early warning, and when is it
part of the (often implicit pre-condition)?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users