News for hackers. Stuff that matters.
Re:Go by Example by cgag on Saturday January 18, 2014 @02:08AM (#7080403)
"But maybe there's a whole class of problem (actual problem, not a sub-problem like "I want to implement a container") that I don't come in contact with."

i want to apply a transformation to every element in a collection

i want to select the elements from a collection for which some predicate holds true

Re:Go by Example by mseepgood on Saturday January 18, 2014 @08:41AM (#7080972)
Use a for loop. Stop thinking in LISP/Haskell/LINQ, start thinking in Go. Go is an imperative programming language. When in Rome do as the Romans do. Look at the code of the standard library to see how it's done.
Re:Go by Example by pcwalton on Saturday January 18, 2014 @01:49PM (#7081779)
It's not because it's unfamiliar that people are objecting; it's because it's suboptimal. Loops are harder to get right (try writing the loop to count down from 100 to 0 inclusive on unsigned ints), and they involve more boilerplate, obscuring the meaning of the code.

I don't think generics are an imperative/functional thing so much as an important feature of any statically typed system.

Re:Go by Example by redbad on Saturday January 18, 2014 @06:55AM (#7080812)
Those are both sub-problems.
Re:Go by Example by cgag on Sunday January 19, 2014 @01:30PM (#7085341)
of every software problem in history