[Cuis-dev] String>>asInteger removed?

Juan Vuletich juan at jvuletich.org
Thu Jun 24 06:37:11 PDT 2021


Just pushed an update to make senders call #findPositiveInteger instead. 
See the whole mail thread for rationale. (hint: the method is _not_ 
converting to an integer, in the way that doing `aString asNumber 
asInteger` would, therefore the name #asInteger is misleading and wrong).

Thanks,

On 6/23/2021 4:28 AM, Phil B via Cuis-dev wrote:
> Philip,
>
> Thanks for pointing that out as I never would have guessed the name 
> that was chosen.  I agree that #asInteger was useful and it seems odd 
> to not to just fix what appeared to be an implementation oversight.  
> At the very least, the base image and core packages should be fixed if 
> we're going this way.
>
> Thanks,
> Phil
>
> On Wed, Jun 23, 2021 at 3:06 AM Philip Bernhart 
> <philip.bernhart at posteo.de <mailto:philip.bernhart at posteo.de>> wrote:
>
>     Hi Phil,
>
>     I know about that, because I have been somewhat involved in that
>     issue.
>     I found out a while ago, that #asInteger does not parse negative
>     numbers. I wrote a mail about that to the mailinglist:
>
>     https://lists.cuis.st/mailman/archives/cuis-dev/2021-January/002716.html
>
>     Juan reacted by removing #asInteger. As #asNumber does basically the
>     same thing.
>
>     I'm not sure if that is good, as #asInteger is somewhat useful.
>     But maybe it's legacy behaviour which should be moved out?
>
>
>     Cheers,
>     Philip
>
>     Phil B via Cuis-dev <cuis-dev at lists.cuis.st
>     <mailto:cuis-dev at lists.cuis.st>> writes:
>
>     > I've been lagging a bit behind on updates and noticed that
>     > String>>asInteger has been removed which breaks DateAndTime
>     > class>>fromString:  Not sure if it's been moved somewhere else
>     or was
>     > inadvertently removed or ???
>     >
>     > Thanks,
>     > Phil
>     > --
>     > Cuis-dev mailing list
>     > Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     > https://lists.cuis.st/mailman/listinfo/cuis-dev
>
>     -- 
>


-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210624/3fff5e9f/attachment.htm>


More information about the Cuis-dev mailing list