News for hackers. Stuff that matters.
Re:Everyday hassles in Go by rtpg on Tuesday December 30, 2014 @08:10AM (#8814408)
maps and filters are things that have existed for a long time, and are extremely commonplace. They are also very representative of common operations in programming.

Not having generics means we can't properly build these ourselves, and Go doesn't offer list comprehensions, so instead we're forced to for loop.

Re:Everyday hassles in Go by NateDad on Tuesday December 30, 2014 @08:18AM (#8814445)
Yes, loops, just like we learned in CS101.
Re:Everyday hassles in Go by gnuvince on Tuesday December 30, 2014 @02:40PM (#8816281)
Loops are basically just compares + labels + jumps, yet we abstracted away from those, because we saw that it was common to want to execute a block of code a given number of times (for loop) or as long as a condition held (while and do/while loops). In recent years, more languages (C++, Java) have added a construct for doing an operation on every element of a collection (for each). Why then can't we have more abstractions of patterns programmers write over and over again? It makes a lot of sense to have an operation to apply a function to every element of a collection (map) or to remove elements of a collection based on a predicate function (filter). Saying that we can write those with loops is the same as saying we can write loop with jumps: true, but have a specialized construct makes the intent of the programmer a lot more clear.
Re:Everyday hassles in Go by frowaway001 on Tuesday December 30, 2014 @11:16AM (#8815162)

  I used to play with a small plastic hammer when I was in 
  kindergarden thirty years ago!
  
  I will be very irritated if people laugh at me for trying 
  to build my new house with this hammer now.

                                               -- Golangers
Re:Everyday hassles in Go by wtf_is_up on Tuesday December 30, 2014 @10:15AM (#8814887)
But writing a loop takes up at least 3 lines in my editor!