On Sun, Jul 26, 2020 at 9: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 {} > > 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. Also, the name "is" doesn't follow the usual naming style of Go packages. I tend to find such package names risky because they don't really say what they contain. This means they become attractors of all kinds of different functionality over time, where most of that functionality isn't belonging in there but in separate packages. It is like declaring a package such as "util", "misc", or "aux". -- J. -- 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/CAGrdgiW48GA1-GU%3DiPBcYsm6W507YXRNbBsLROkQa1HBFbPzxA%40mail.gmail.com.