On Mon, Oct 19, 2009 at 10:33 PM, Nicolas Cellier
<nicolas.cellier.aka.nice@gmail.com> 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
�
Hope this helps...
Nicolas
2009/10/20 Mariano Martinez Peck <marianopeck@gmail.com>:
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project