News for hackers. Stuff that matters.
Re:Making the move from Scala to Go by nunobrito on Wednesday January 25, 2017 @08:54AM (#13481340)
The second example is vastly more readable in terms of understanding what it is supposed to do.

I mention this as neither a programmer on either Scala nor Go.

If it is of any relevance, I've been writing code for about 20 years across C, Java, Javascript, PHP and shell scripts. I'm sure other FP developers will roll their eyes to a traditional developer like me but the one-liner you mention is simply not self-explanatory for an outsider when reading it.

Re:Making the move from Scala to Go by spdionis on Wednesday January 25, 2017 @09:16AM (#13481476)
"I've been speaking italian, french and spanish for 20 years. I'm sure people who speak germanic languages will roll their eyes to a traditional latin-languages guy like me, but the german sentence you mention is simply not self-explanatory for an outsider when reading it."
Re:Making the move from Scala to Go by kaoD on Wednesday January 25, 2017 @09:17AM (#13481487)
The second one is so readable it contains a subtle bug nobody noticed.
Re:Making the move from Scala to Go by gribbly on Wednesday January 25, 2017 @11:15AM (#13482613)
What 'subtle' bug ?

It returns 'email' instead of 'emails' which I assume was a typo, which of course the compiler would complain about, are you claiming that a variable name typo is somehow a 'subtle bug' ?

Only other thing I see directly is that 'users' is undefined, but this is a code snippet after all, not a working program.

Re:Making the move from Scala to Go by kornish on Wednesday January 25, 2017 @05:18PM (#13486778)
I think kaoD's point is that more code will always produce more errors, and more code (in the name of "readability") can give more surface area for bugs.
Re:Making the move from Scala to Go by sacheendra on Wednesday January 25, 2017 @09:42AM (#13481684)
But that would be caught by the compiler. The error would be variable not defined.
Re:Making the move from Scala to Go by matt_kantor on Thursday January 26, 2017 @12:36PM (#13493349)
Out of curiosity, what specifically do you find unreadable about the first example?