News for hackers. Stuff that matters.
Re:Don’t Be Scared Of Functional Programming by chris_mahan on Wednesday July 02, 2014 @06:09PM (#7980102)
"Edit: let's not forget your Python example uses a map, disguised as a for loop"

Mmmm, really? A map? Like Google maps? Like a paper map? unfamiliar terminology.

Seriously, I learned how to use for loops in 1984. Been using them ever since. Maybe that's the problem. Too old to learn new tricks.

Re:Don’t Be Scared Of Functional Programming by innguest on Wednesday July 02, 2014 @06:53PM (#7980347)
It's not unfamiliar, you got it right, the map I'm talking about is exactly like that maps you described, in that they both contain directions (all the possible origin-destination relationships between all the places) and you can draw arrows from one place to another (thereby defining a "route" that represents the act of starting to walk from point A and arriving at point B). If you cared to learn you would benefit a lot from it.

Oh, but the moral of the story is that because the computer understands those maps, then I can simply tell it what I have (point A, origin) and what I want (point B, destination) without telling it how to do it. Then the computer goes and writes that code for me! The same code you're now still writing manually. Because you don't want to learn a new "trick". :)

Re:Don’t Be Scared Of Functional Programming by chris_mahan on Wednesday July 02, 2014 @07:16PM (#7980460)
That still made no sense, sorry.
Re:Don’t Be Scared Of Functional Programming by dragonwriter on Wednesday July 02, 2014 @07:06PM (#7980413)
> Mmmm, really? A map? Like Google maps? Like a paper map? unfamiliar terminology.

No, a map like the Python built-in function "map". Though, really, the for loop in your Python sample isn't a map done as a for loop, its a reduce done as a for loop. (Again, like the Python built-in "reduce".)

Re:Don’t Be Scared Of Functional Programming by sanderjd on Thursday July 03, 2014 @12:52AM (#7981499)
You can learn these tricks, but it's ok if you don't want to, as long as you don't mind that many of us like doing things this way, and recognize that you may well run into these concepts in other peoples' code at some point.