[squeak-dev] Explorer / Inspector bug?

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Tue Mar 9 13:47:49 UTC 2021


> "I want a two second delay" is perfectly valid :D

Maybe a native English speaker can correct me but afaik, in the grammar dependency tree of "two-second delay", "two-second" is not an independent noun but a pre-modifying phrase only. Shall we really start to support even more different types of words in an object-oriented language like Smalltalk? Imho, substantives and verbs are already enough. :-)

Otherwise, we might end up with overcomplicated expressions such as "2 seconds later do: [self flash. Wait for: 1.5 hour delay. self flash]". Exaggerating, of course. Though syntactically valid Smalltalk, definitively not "our" flavor of Smalltalk ... Reminds me rather of questionary constructs such as in RSpec (Ruby), for example.

And if this argument is way too complex, here is even a simpler one: According to Grammarly, "two second delay" is not even valid English. It needs to be "two-second delay" and I have never heard of mapping grammatical hyphens to separate messages in Smalltalk languages before. But would like to read some examples if there are any. :-)

Lbnl, I think it causes a lot of confusion and the need for coding styles if we create multiple selectors that do the same thing ... #ifNil:ifNotNil: vs #ifNil:ifNotNilDo:/#ifEmpty:ifNotEmpty: vs #ifEmpty:ifNotEmptyDo: is already hard enough.

Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Tobias Pape <Das.Linux at gmx.de>
Gesendet: Dienstag, 9. März 2021 14:26:05
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Explorer / Inspector bug?



> 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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210309/6aff75e8/attachment.html>


More information about the Squeak-dev mailing list