I was watching rus cox's last talk
<https://www.youtube.com/watch?v=0Zbh_vmAKvk> and he mentioned that not
every problem should be solved by language change. Some can be solved by
tooling or library change.
I am curious has any of the generics lovers written a tool that helps for
generic behavior. Something like,*
//@generic
func Max(x, y T) T {
if x > y {
return x
}
return y
}
When the tool sees generic comment, it rewrites the function for each type
as called, like Maxi(x, y int) int, Maxf64(x, y float64) float64 etc..
** I know there are many issues with this example but it's just to show my
point*
I know people wrote tools like goimports, gocode out of real needs, and
they are everywhere.
I just want to know sincerely, if people REALLY need generics so much, or
they are just complaining because they are used to it and it's in their
favorite programming language.
Thanks.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.