[squeak-dev] The Inbox: Collections-hk.360.mcz

Frank Shearar frank.shearar at angband.za.org
Thu May 20 07:27:01 UTC 2010


On 2010/05/20 07:05, commits at source.squeak.org wrote:
> A new version of Collections was added to project The Inbox:
> http://source.squeak.org/inbox/Collections-hk.360.mcz
>
> ==================== Summary ====================
>
> Name: Collections-hk.360
> Author: hk
> Time: 20 May 2010, 9:04:53.211 am
> UUID: 75c4bea4-ca87-3a40-8a74-e89fc5b7b750
> Ancestors: Collections-ul.359
>
> changed String isAllDigits to return false on empty strings
>
> =============== Diff against Collections-ul.359 ===============

Isn't the problem that the caller wants to know that some string 
contains a number (in base 10, presumably)?

It seems perfectly sensible that '' isAllDigits returns true - because 
it's vacuously true.

So shouldn't there be (and I haven't looked for existing functionality) 
something like String>>isNumeric which says self isEmpty and: [self 
isAllDigits] ?

I'm torn between my sense of logic and my desire to avoid bikeshedding.

frank



More information about the Squeak-dev mailing list