On Aug 23, 2010, at 9:39 AM, Johan Brichau wrote: > > I agree that String>>asTime is an accident waiting to happen. It's not that > much effort to use the following: Time readFromString: aString > > But there is a problem with the readFromString: method as well. > At the very least, if the string does not represent a valid time, it should > throw an error.
yes > > > On 23 Aug 2010, at 09:16, Mariano Martinez Peck wrote: > >> >> >> On Mon, Aug 23, 2010 at 9:07 AM, Fernando olivero <[email protected]> >> wrote: >> humm...I agree with Kent Beck and Stef, because conceptually a String >> shouldnt know how to answer #seconds. >> >> Maybe its a matter of having better interactions, smarter text morphs , than >> introducing this in the "model". >> >> >> >> maybe where are discussing what we prefer...if nice in words/language or >> better in OOP. >> >> For example, I may (not sure) agree Number understands #seconds. But I may >> think also that a better OOP would not Number understand #seconds but stead >> have Duration seconds: 3 >> >> But...'3 seconds' is nicer...it is more similar to our language. >> >> >> Fernando >> >> >> On Aug 23, 2010, at 9:00 AM, Brent Pinkney wrote: >> >>>> I would really like to have the approach proposed by K. Beck on conversion >>>> methods. Conversion methods for API compatible objects. Of course it will >>>> lead to less compact program (URL readFrom: 'http://' instead of 'http://' >>>> url) but avoids a lot of code in String (of course class extensions limit >>>> the plague). >>> >>> Hi, please reconsider this. There is just no way (Duration seconds: 3) is >>> better than '3 seconds'. >>> >>> This smacks of working for the computer instead of the other way around. >>> >>> Brent >>> >>> _______________________________________________ >>> 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 _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
