isZero on collection does not make sense so it was deprecated now
some tests like are breaking 3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5) so ? Stef _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
(a - b) allSatisfy: [:each | each isZero] ?
2009/6/13 Stéphane Ducasse <[hidden email]>: > isZero on collection does not make sense so it was deprecated now > > some tests like are breaking > > 3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5) > > so ? > Stef > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
I haven't yet looked at the cs on the mantis report, but why do we
expect to be able to coerce a collection into a number? (non an obvious behaviour for collections) thanks, Mike On Sat, Jun 13, 2009 at 3:48 PM, Nicolas Cellier<[hidden email]> wrote: > (a - b) allSatisfy: [:each | each isZero] ? > > 2009/6/13 Stéphane Ducasse <[hidden email]>: >> isZero on collection does not make sense so it was deprecated now >> >> some tests like are breaking >> >> 3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5) >> >> so ? >> Stef >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
I hate this coercion.
Nicolas I do not understand your answer. For me a collection isZero means nothing. Stef On Jun 13, 2009, at 5:04 PM, Michael Roberts wrote: > I haven't yet looked at the cs on the mantis report, but why do we > expect to be able to coerce a collection into a number? (non an > obvious behaviour for collections) > > thanks, > Mike > > On Sat, Jun 13, 2009 at 3:48 PM, Nicolas > Cellier<[hidden email]> wrote: >> (a - b) allSatisfy: [:each | each isZero] ? >> >> 2009/6/13 Stéphane Ducasse <[hidden email]>: >>> isZero on collection does not make sense so it was deprecated now >>> >>> some tests like are breaking >>> >>> 3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5) >>> >>> so ? >>> Stef >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
The failing test you exposed sounds like the difference is used to
test equality between two FloatArray. If that is the case, you could replace isZero by isAllZero. I did not run an image nor look at the code, alors je suis peut être à côté de la plaque... 2009/6/13 Stéphane Ducasse <[hidden email]>: > I hate this coercion. > > Nicolas I do not understand your answer. > For me a collection isZero means nothing. > > Stef > > On Jun 13, 2009, at 5:04 PM, Michael Roberts wrote: > >> I haven't yet looked at the cs on the mantis report, but why do we >> expect to be able to coerce a collection into a number? (non an >> obvious behaviour for collections) >> >> thanks, >> Mike >> >> On Sat, Jun 13, 2009 at 3:48 PM, Nicolas >> Cellier<[hidden email]> wrote: >>> (a - b) allSatisfy: [:each | each isZero] ? >>> >>> 2009/6/13 Stéphane Ducasse <[hidden email]>: >>>> isZero on collection does not make sense so it was deprecated now >>>> >>>> some tests like are breaking >>>> >>>> 3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5) >>>> >>>> so ? >>>> Stef >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Ah OK, I just ran the test, I know understand.
You could eventually replace isZero with = 0 in that case... 2009/6/13 Nicolas Cellier <[hidden email]>: > The failing test you exposed sounds like the difference is used to > test equality between two FloatArray. > If that is the case, you could replace isZero by isAllZero. > I did not run an image nor look at the code, alors je suis peut être à > côté de la plaque... > > > 2009/6/13 Stéphane Ducasse <[hidden email]>: >> I hate this coercion. >> >> Nicolas I do not understand your answer. >> For me a collection isZero means nothing. >> >> Stef >> >> On Jun 13, 2009, at 5:04 PM, Michael Roberts wrote: >> >>> I haven't yet looked at the cs on the mantis report, but why do we >>> expect to be able to coerce a collection into a number? (non an >>> obvious behaviour for collections) >>> >>> thanks, >>> Mike >>> >>> On Sat, Jun 13, 2009 at 3:48 PM, Nicolas >>> Cellier<[hidden email]> wrote: >>>> (a - b) allSatisfy: [:each | each isZero] ? >>>> >>>> 2009/6/13 Stéphane Ducasse <[hidden email]>: >>>>> isZero on collection does not make sense so it was deprecated now >>>>> >>>>> some tests like are breaking >>>>> >>>>> 3.0 / (FloatArray with: 2.0) = (FloatArray with: 1.5) >>>>> >>>>> so ? >>>>> Stef >>>>> >>>>> _______________________________________________ >>>>> Pharo-project mailing list >>>>> [hidden email] >>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |