[squeak-dev] Explorer / Inspector bug?
Tobias Pape
Das.Linux at gmx.de
Tue Mar 9 13:26:05 UTC 2021
> On 9. Mar 2021, at 14:23, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>
> +1 for preventing "2 second" from answering "1 second", too confusing.
yes
> -1 for answering "2 seconds" for "2 second", that would be very ambiguous language and grammatically incorrect. :-)
no.
"I want a two second delay" is perfectly valid :D
-t
>
> I think we should either go with an assertion (self assert: self = 1) or deprecate the singular selectors altogether.
>
> Best,
> Christoph
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Chris Muller <asqueaker at gmail.com>
> Gesendet: Dienstag, 9. März 2021 05:53:10
> An: The general-purpose Squeak developers list
> Betreff: Re: [squeak-dev] Explorer / Inspector bug?
>
> 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.
>
> That's correct. Brent adopted those methods from my MaTimeObjects package (which is still installable from SqueakMap), although in my version it didn't even account for the sign, it was always just ^ 1 second, regardless of the receiver. I agree they should just be synonyms.
>
> Off topic, but there are other problems with these duration methods.
> They are defined in Number but round the duration magnitudes to
> whole seconds.
>
> Where do you see that? I just tried "1.5 hours" and it worked...
>
> And durations for 1 day or 1 week are undefinable
> due to daylight savings transitions and occasional leap seconds.
>
> True, from a literal sense, but by that assessment we would have similar "problems" with ChronologyConstants' DaysInMonth, MicrosecondsInDay, OneDay, SecondsInDay, SecondsInHour, and SecondsInMinute. All are useful, nonetheless.
>
> - Chris
More information about the Squeak-dev
mailing list
|