Hacker News new | ask | show | jobs
by pcwalton 3505 days ago
> I dispute that these features improve productivity. With the exception of modules (whose purpose has always eluded me) all are available in Go (or could be trivially implemented) at the expense of safety and/or performance.

OK. How do you implement array.map() in Golang?

1 comments

Wow. That seems very complicated for an implementation of map().

It seems like this is a perfect example of how generics are a productivity feature.

It's complicated because the reflect library is very general. There's no need to repeat most of this. So in fact, it's a perfect example of how functions are a productivity feature.
I would argue it's both.