ma...@acln.ro schrieb am Montag, 27. Juli 2020 um 08:34:04 UTC+2:
> The entire notion of the constraints package feels a little suspicious to
> me. What if the comparable and ordered constraints were pre-declared in the
> universe block, and the numeric constraint were named math.Numeric?
>
In
The entire notion of the constraints package feels a little suspicious to
me. What if the comparable and ordered constraints were pre-declared in the
universe block, and the numeric constraint were named math.Numeric? What
other universal (or close to universal) constraints would belong in this
ent
On Sun, Jul 26, 2020 at 1:05 PM wrote:
> Also, the name "is" doesn't follow the usual naming style of Go packages.
>>
>
> I'm not sure if there is a Go standard library package naming style other
> than "relatively short name".
>
"relatively short name" is less consistently applied than "be desc
I like ‘is’. Very readable and Go-like.
> On Jul 26, 2020, at 6:05 AM, frederik.z...@gmail.com wrote:
>
>
>> On Sunday, July 26, 2020 at 12:46:38 PM UTC+2, Jesper Louis Andersen wrote:
>>
>> You can always solve that with a rename:
>>
>> import (
>> is "constraints"
>> )
>>
>> but you run
On Sunday, July 26, 2020 at 12:46:38 PM UTC+2, Jesper Louis Andersen wrote:
>
>
> You can always solve that with a rename:
>
> import (
> is "constraints"
> )
>
> but you run the risk of users not knowing what the "is" package is.
>
Of course, but like you said, "is" would be unfamiliar to most
On Sun, Jul 26, 2020 at 9:30 AM wrote:
> The package name "constraints" is quite a mouthful to read:
>
> func Min[Elem constraints.Ordered](s []Elem) Elem {}
>
> Did you consider other package names like "is"?
>
> func Min[Elem is.Ordered](s []Elem) Elem {}
>
>
You can always solve that with