I’ve been a C++ dev for a couple of decades and know my fair share of unreadable code. I’ve recently started learning Python and holy shit, it’s like you get accolades in this language for doing as much as possible in as few characters as possible. Guess I’m getting too old for these young whippersnappers.
lopatin|1 year ago
But seriously, of course you can write Python one-liners or nested comprehensions, but I get the idea that it's not really Pythonic. They still want clear, iterative code. It's just more concise, but the idea is the same, but with less scrolling.
mostlysimilar|1 year ago
Like any other language you can write perfectly expressive and intelligible code in Ruby, and in fact it is quite common to do so. The first layer of a Ruby codebase tends to be approachable, it's only when you get into some of the bigger libraries that you get some tricky metaprogramming.
Even then I don't often see Rubyists write tricky/clever code for the sake of it. The metaprogramming usually has utility and is often the "right" way to do something, especially in say the Rails codebase.
Ruby is all about developer happiness. It's the founding principle and the guiding ethos of the community.
JohnBooty|1 year ago
I spent about a decade with Ruby and my general impression is that the community really moved away from overly-clever metaprogramming.
The codebase for the Ruby language itself is definitely a challenging read.
JohnBooty|1 year ago
I guess it's a good problem to have, in a lot of ways, because it's also why Python has that huge science/datascience/etc ecosystem.