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 entirely agnostic "constraints" package?
On Sun, Jul 26, 2020 at 10:30 AM <frederik.z...@gmail.com> 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 {} > > is.Ordered > is.Integer > is.Signed > is.Unsigned > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/fb694112-7d2f-4db0-a0fd-86fd05459ae3o%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/fb694112-7d2f-4db0-a0fd-86fd05459ae3o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Andrei Călin -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CANnvmN6bccEB7Jw-6ufAeZaGw-LqRGUDmu9_0HBoZg4_tgMurw%40mail.gmail.com.