News for hackers. Stuff that matters.
Re:Why Python doesn't need blocks by bryanlarsen on Monday June 30, 2014 @11:42AM (#7965615)
Sure, once you understand the differences between bound and unbound methods, blocks, lambdas and Proc's. That's a lot to understand for something that's fairly simple in many other languages.
Re:Why Python doesn't need blocks by andrewvc on Monday June 30, 2014 @12:48PM (#7966045)
You don't need understand that much. If all you know is "a block is just fancy syntax for passing an optional lambda into a method", that will suit you just fine. Does it capture 100% of the nuances of a block? No. But it's a fine bit of functional knowledge. If you throw in calling Object#method(:foo) returns what amounts to lambda {|args| Object.foo|args| } you have 99% of what you'll ever need.
Re:Why Python doesn't need blocks by mcphage on Monday June 30, 2014 @01:50PM (#7966449)
> That's a lot to understand for something that's fairly simple in many other languages.

That's what's so nice about how Ruby does it; you don't need to understand any of that to use blocks. As you learn the language, you learn those things, but none of them are required to get started.

Re:Why Python doesn't need blocks by angersock on Monday June 30, 2014 @12:17PM (#7965852)
Surely that's not really that difficult to understand?