Well, you could certainly implement min or max generically without operators in 
contracts if you use a wrapper type for primitives and pointers. A bit more 
verbose perhaps, but that is also how it is now.

I can only speak for myself and say that I would not be disappointed at all 
with such simple contracts. IMHO generics could just be the compile time 
equivalent of interfaces, an that would be largely sufficient for me. 

Then again, I guess people coming from other languages like D or C++ would 
expect generics to work with operators. So I can see where Ian is coming from. 

But on the third hand, Go is a language that doesn't add features just because 
people expect or like them. The basic design of Go is to have only features for 
which the benefits outweigh the complexity cost. Seeing that operators in 
contracts are complex and not strictly needed, I feel we could do without.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to