Go could have least have parametric functions (ex :

func Foo<T>(value T)T { /.../ }

bar := Foo<int>(3) //types are verified at compile time, no need for 
reflection or interface {} on any runtime trick.

).

But talking about this is kind of useless until Go rids itself of its over 
reliance on runtime features like reflection. I suspect Go reflection 
capabilities are why the language stopped evolving significantly at first 
place. String tags are another symptom of that "disease".

It's possible to write the snippet above with reflection today 
(reflect.MakeFunc) , it shouldn't be.


-- 
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