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 this case 'Ordered' might belong in the "sort" package: sort.Ordered, and most other constraints in the 'math' package: math.Numeric, math.Complex, math.Unsigned. Or maybe 'Complex' belongs in "math/cmplx" as cmplx.Number. But from a dependency hygiene perspective it is probably better to have the most common constraints in a dedicated package rather than distribute them over existing packages. I suppose we would not want "math" to import "sort" in order to implement Min and Max. > -- 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/7a189321-ff08-4ca7-a7fd-fe00fc9ce613n%40googlegroups.com.