3 ms·
"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 terminolog
by chris_mahan 12y ago
"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.
- innguest 12y agoIt'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". :)
- chris_mahan 12y agoThat still made no sense, sorry.
- dragonwriter 12y ago> 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".)
- sanderjd 12y agoYou 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.