[squeak-dev] Delay for: 60 seconds vs. Delay forSeconds: 60.

Göran Krampe goran at krampe.se
Fri Jan 8 08:41:44 UTC 2010


Hi!

Frank Shearar wrote:
> Andreas Raab wrote:
>> Hi there -
>>
>> I just realized how silly it is to write code like:
>>
>>     (Delay forSeconds: 60) wait.
>>     (Delay forMilliseconds: 1000) wait.
>>
>> when we have units available and might as well say:
>>
>>     (Delay for: 60 seconds) wait.
>>     (Delay for: 5 days + 3 hours + 17 minutes) wait.
>>
>> What do people think about this? Overkill or just right?

Presuming we have no real performance issue I would say the latter is 
probably what we should use - earlier we didn't have Durations in the 
library, but now that we do we should probably go "all the way" to get 
all the polymorphic glory.

So +1, and same probably goes for other similar situations :)

regards, Göran




More information about the Squeak-dev mailing list