Re:Playing with Go: Embarrassingly Parallel Scripts
by 0xABADC0DA on Tuesday December 04, 2012 @01:01AM
(#4869744)
If you think you can do asyncMap in Google Go, without casts and without manually collecting multiple return values, by all means show us the code. I would find that really interesting.
Re:Playing with Go: Embarrassingly Parallel Scripts
by burntsushi on Tuesday December 04, 2012 @02:23AM
(#4869902)
I didn't claim I could. Take your trolling elsewhere.
> Except Google Go returns several values instead of tuples, so you can't just collect all the results as-is.
This is false. Functions in Go do not have to return multiple values. Therefore, you can "collect all the results as-is".
> And with no generics it would be annoying to actually use e and the result, since they would need casts. Too bad.
Actually, it wouldn't be annoying, because you wouldn't use a general purpose map like you've shown. You'd use code shown in the parent.