Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why Python

Name: CrieS Raymond 2007-07-11 20:55 ID:zwAX6BRF

"[on reduce() being removed from python]So now reduce(). This is actually the one I've always hated most, because, apart from a few examples involving + or *, almost every time I see a reduce() call with a non-trivial function argument, I need to grab pen and paper to diagram what's actually being fed into that function before I understand what the reduce() is supposed to do. So in my mind, the applicability of reduce() is pretty much limited to associative operators, and in all other cases it's better to write out the accumulation loop explicitly."

ONE WORD, THE FORCED GUIDO VAN ROSSUM, THREAD OVER.

for the love of god, this guy is the dumbest programmer ever. even the most newbies programmers I know at my smalltalk class at university know how to use inject:into:, and would never write an acummulator loop correctly. Argue to any smalltalker that writing

|total|
aCollection do: [e| total := e method + total]
^total

is better and clearer than

^aCollection inject: 0 into: [e| total + e method]

and he'll kick you in the ass. And smalltalk isn't even a functional language!

Name: Anonymous 2007-07-16 20:38 ID:SDRC86hi

>>25
where did I bash python in the post you quoted? I just talked about personal preference. guido could have made x.reverse() return x itself, but that could be confusing, that's why he didn't, even if it would be convenient.
I personally never had to do x = x.reverse(), because when you program functionally, you rarely have to.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List