[squeak-dev] Re: isPrime is now Primo, part 2
smalltalktelevision at gmail.com
Thu Mar 18 16:21:54 UTC 2010
"In fact 1 (integer one) is by definition NOT a prime number
Yea, I had a feeling somebody was going to say this. As a non-math
person, it seems obvious to me that 1 would be a prime. That it is a
prime doesn't change for me that the old design of isPrime in 3.10.2
was not to my liking. If I give isPrime a list of numbers to check. It
should give a judgement on whether it is or isn't prime. It shouldn't
say "I'll stop on 1, because.... it's not a prime!" 4 isn't a prime
either. Should it stop there? Clearly the designers of the new Trunk
isPrime didn't think so. The old implementation created confusion for
me, where, rightfully, I don't think there should have been any.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev