Testing if a String is a number
Todd Blanchard
tblanchard at mac.com
Thu Jul 6 01:44:15 UTC 2006
Agree - isThing usually tests if the object is an instance of Thing.
A message name like isNumberAsString would be more "standard".
On Jul 5, 2006, at 12:09 PM, Peter Crowther wrote:
>> From: Damien Cassou
>> I'm surprised there is no #isNumber selector for strings.
>
> Do you mean "responds to arithmetic messages" or "could be converted
> into something that responds to arithmetic messages"? #isNumber means
> the first (to me); your use seems to be the second. Given that I have
> code that tests for #isNumber before sending (eg) #+ to an object, I'd
> be unhappy about the second use!
>
> - Peter
>
More information about the Squeak-dev
mailing list
|