News for hackers. Stuff that matters.
Re:Pattern Matching in Ruby 2.7 (2019) by tigershark on Thursday January 09, 2020 @12:27PM (#22003292)
It’s your point of view. From my point of view ruby looks much more like pseudo code than python. It reads almost like English. And the closures syntax is way better and much more powerful given that it’s not sillily limited to one expression.
Re:Pattern Matching in Ruby 2.7 (2019) by larkost on Thursday January 09, 2020 @12:54PM (#22003592)
On the closure front, you are assuming that `lambda` is the only way of writing a closure in Python. That is not true. You can write a named function (`def blah():`) in the same place, pass it around (within that scope the name is now `blah`), and it will still have access to the variables in the original scope. So it is a closure, just a named one.

At first I rebelled against not having unnamed closures, but then you hit the first problem in a complex case, and the backtrace having sane names suddenly makes it all more than worth it.