3 ms·
Possibly.I regulary use both static and dynamic languages and lack of generics was one of my biggest complaints. If it's a static language, I want generics. If
by RivieraKid 13y ago
Possibly.I regulary use both static and dynamic languages and lack of generics was one of my biggest complaints. If it's a static language, I want generics. If the language is dynamic I don't really care (although some dyn. languages have generics).
- maxk42 13y agoI thought it was a pain in the ass until I realized golang really does have a sort of dynamic parameter: func test(myVar interface{}) will accept any type at all. You can then use Go's type switch or a call to reflect.TypeOf() to invoke different behavior based on the parameter's type. To my way of thinking, it's pretty simple.