2009/10/20 Mariano Martinez Peck <[email protected]>: > > > On Mon, Oct 19, 2009 at 10:33 PM, Nicolas Cellier > <[email protected]> wrote: >> >> Yes, I understand the paradigm, nil is nothing is zero, empty is >> nothing is zero... >> But frankly, do you think '' forms a valid Number ? In every context ? >> So yes, this is expected, and can break compatibility, but sometimes >> this is necessary. >> >> If you want to keep this behaviour, you have to use an explicit rule like: >> asNumberOrZero >> ^Number readFrom: self ifFail: [^0] >> > > Thanks Nicolas. Now, the question is, do you think we can create this method > in String as part of Pharo core? or I should add it to my application? > > cheers > > mariano >
Depends if the pattern was used by many packages or not... It would be stupid to create 10x the same extension to work around a pharo change. Would it be a temporary helper subject to deprecation, or a definitive feature ? I can't tell, and i don't decide, i only suggest. Nicolas >> >> Hope this helps... >> >> Nicolas >> >> 2009/10/20 Mariano Martinez Peck <[email protected]>: >> > Hi folks: In older images, like 10418, '' asNumber gave me a 0 (zero). >> > But >> > now, I get a 'Reading a number failed'. >> > >> > Is this expected? >> > >> > Perhaps it is due to the fix to this bug: >> > >> > >> > http://code.google.com/p/pharo/issues/detail?can=1&q=1258&colspec=ID%20Type%20Status%20Summary%20Milestone&id=1258 >> > >> > any toughs? >> > >> > best >> > >> > Mariano >> > >> > _______________________________________________ >> > Pharo-project mailing list >> > [email protected] >> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
