[squeak-dev] Explorer / Inspector bug?

David T. Lewis lewis at mail.msen.com
Sat Mar 6 15:05:21 UTC 2021


On Sat, Mar 06, 2021 at 02:34:44AM -0600, Jaromir Matas wrote:
> > That sounds like a surprising feature/bug ??? either it should wait for 10
> seconds, or it should throw an error, IMHO, but not simply disregard the
> receiver. I'd prefer if it just did the expected thing, making #second and
> #seconds synonyms.
> 
> +1. It bit me a couple of times already :)
> 

+1

My expectation would be that #second, #minute, #hour etc would
be syntactic sugar. And I certainly would not expect "5 second"
to mean one second duration.

I note that we have several methods like this (second, minute, hour...)
and they have Brent Pinkney's (brp) initials since 2004. I don't know
if anyone depends on that existing behavior.

Off topic, but there are other problems with these duration methods.
They are defined in Number but round the duration magnitudes to
whole seconds. And durations for 1 day or 1 week are undefinable
due to daylight savings transitions and occasional leap seconds.

Dave


> I'm not sure it's grammatically 100% correct but in English there's e.g. a
> five-second delay etc. sometimes written as five second delay...
> 
> 
> Number >> second
> 
> 	^ self sign seconds
> 
> Number >> sign
> 	"Answer 1 if the receiver is greater than 0, -1 if less than 0, else 0."
> 
> 	self > 0 ifTrue: [^1].
> 	self < 0 ifTrue: [^-1].
> 	^0
> 
> 
> 
> 
> 
> -----
> ^[^ Jaromir
> --
> Sent from: http://forum.world.st/Squeak-Dev-f45488.html
> 


More information about the Squeak-dev mailing list