4 ms·
Interesting. Even with the examples given, I found Python considerably easier to follow, with the possible exception of the inheritance example. Just goes to s
by kuang_eleven 4y ago
Interesting. Even with the examples given, I found Python considerably easier to follow, with the possible exception of the inheritance example.
Just goes to show how subjective it all is!
- synergy20 4y agoI agree, ruby's @ and @@ probably will make it a bit harder to read for anyone that is new to both languages, plus it seems more lengthy to me, python wins.
- brigandish 4y agoAs an aside, it's bad practice to use @@ variables (IMO), they're easily clobbered. Class instance variables are much better[1]. I might also add, if you create getters for an instance variable then you don't need to use the @, except in the getter itself (and you don't even need to do that as there is the `attr_reader` helper for that). [1] https://maximomussini.com/posts/ruby-class-variables https://maximomussini.com/posts/ruby-class-variables
- philovivero 4y agoIndeed. I started working with Ruby for at least a year before I started working with Python. To this day I still can't do anything useful in Ruby, and I'm proficient in Python. Python is far more readable and comprehensible than Ruby. Haven't even bothered to read TFA because it's just weird flamewar bait.
- joshuamorton 4y agoYes, up until the mention of multiple inheritance, I thought the post was mediocre satire.
- drcongo 4y agoSame. The amount of boilerplate and "unnecessary" symbols in Ruby make it considerably less readable to me. The Python examples aren't just readable, they're glanceable.