Re:Go: Planning the 1.5 release
by 4ydx on Tuesday December 02, 2014 @09:54PM
(#8691634)
I must write code that is just too simple and uninteresting because I never use generics. I also really enjoy go.
[ Parent
| on HN ]
Re:Go: Planning the 1.5 release
by notduncansmith on Wednesday December 03, 2014 @07:21PM
(#8697197)
Have you ever used Array#map in Javascript (or any dynamic language)? What about filter or reduce? Those are useful things not possible in Go.
Well, technically they are (whipped up a quick example): http://play.golang.org/p/e2qkKN4VY1
But it requires the use of interface{}, which reduces the usefulness of the type system, and you still can't do (what I guess must be crazy) stuff like return a slice.