Live data from Hacker News

Why Ruby Is More Readable Than Python

confuzeus.com

91–100 of 149 posts

Re: Why Ruby Is More Readable Than Python

#91
post #61

Earlier quoted context omitted.

That’s without even mentioning the footguns available in @@count Jez!

Ah sure, this alternate implementation assumes that the BlogPost class is final and never subclassed. If you plan to subclass BlogPost, the translation is not identical, as the alternate implementation would not keep track of a global count of posts across all subclasses, only of `BlogPost` instances exactly.

Depends who accessed it first ;)

Re: Why Ruby Is More Readable Than Python

#92

With better unicodes I wish computer language could use fancier characters to express loops, conditionals and in general without using the english language. goodbye to [if, else, switch, break, lastly, each etc..] let us crate a language that uses no letters but unicode symbols to express abstractions. Like emojis.

You can use Emojicode [0] if you'd like. I'd rather keep using Ruby, Go, Python, etc but to each their own.

[0] https://www.emojicode.org/

Re: Why Ruby Is More Readable Than Python

#93
post #61

Earlier quoted context omitted.

That’s without even mentioning the footguns available in @@count Jez!

Ah sure, this alternate implementation assumes that the BlogPost class is final and never subclassed. If you plan to subclass BlogPost, the translation is not identical, as the alternate implementation would not keep track of a global count of posts across all subclasses, only of `BlogPost` instances exactly.

I saw you closed my ticket on sorbet for generics + sealed + exhaustiveness, that’ll allow some very welcome code cleanup!

Re: Why Ruby Is More Readable Than Python

#94

Ruby, like so many other good things, is best enjoyed alone :-) I've loved every Ruby codebase that I've written. I still consider it one of my favorite programming languages, and (in pedagogical terms) one of the best languages for learning "practical" functional programming (point-free style, blocks as intuitive closures, &c.). But when I work with others, I find that all of the things that I love are obnoxiously c…

Yeah, Ruby is like poetry.

Most poetry is like https://hitchhikers.fandom.com/wiki/Vogon_poetry.

And the worst is that I'm unable to do poetry.

---

I'm enthusiast about learning about languages, and enjoy everything I see about APL, Ruby, Scheme, Forth, Haskell, etc. I actually LIKE the concepts.

Is kind of relaxing take a look around the basic tutorial or read what the "good" poets say about that.

But my instinct tell me it will be torture to live like a poet.

So, for actual work, is much better (for me) all languages that have restriction and strict ideas about stuff.

- Python FORCE indentation? SOLD!

- Pascal DEMAND declare all before use? GIVE ME MORE!

- Rust SMASH YOUR HEAD at every keystroke? SHUT UP, TAKE MY MONEY!

Re: Why Ruby Is More Readable Than Python

#95

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!

Yes, up until the mention of multiple inheritance, I thought the post was mediocre satire.

Re: Why Ruby Is More Readable Than Python

#96
I didn't get Python until it was pointed out to me that Python is procedural. The objects in Python is more like how I wrote "object-oriented programming" in Pascal with records and procedures. All the intuitions one would expect in Ruby with respect to encapsulation is inverted in Python.

I have noticed that this extends to Ruby's approach to bundler, and Python's approach to virtualenv/et al.

Knowing this made me less irritated at Python.

Re: Why Ruby Is More Readable Than Python

#97

Subjective opinion presented as fact? Say it ain't so.

No. If the author were truly trying to present this as fact there’s be far more remarks against anticipated disputes “pythonistas will say… blah blah blah… but here’s why they’re wrong” or more extreme statements, “it’s an objective truth that… only fools would deny…”

The author doesn’t do any of this, in fact the author is barely even arguing a point. It’s pretty clearly an opinion piece. Human beings have been writing like this and differentiating between fact and opinion for centuries. Demanding that all writing be watered down to hedge-laden statements and statistics would land us in a very boring world indeed. People can read, judge, and think for themselves. We don’t all approach literature like computers reading instructions.

Re: Why Ruby Is More Readable Than Python

#98
post #54

Earlier quoted context omitted.

The author relies on you, the reader, to exercise thought? Say it ain't so.

Maybe the blog post title should then be "Why a Ruby dev finds Ruby more readable than Python". And the post body reads: "Because that's what they're used to." Fin. Roll credits. Personally, I find Python more readable, because I know Python better than Ruby. I don't think there's anything inherently more discoverable about @@ to denote a class field. Python instance fields are all prefaced with self, so a bit of cur…

Right, but the goal of an essay is typically not to disseminate certified, proven fact beyond all possible dispute. In fact, many essays argue points that are inherently fuzzy—e.g. an essay on your interpretation of your favorite novel will make an argument for your interpretation but it will never prove that it is the one true interpretation of a novel since that’s ridiculous and impossible.

Often the goal in writing an essay is to share a personal view or experience, and sometimes to get others to share their thoughts on a topic. For example, if you did write an essay on why Java’s static is better than Ruby’s @, it might lead others to engage with you, share their thoughts, and help you learn more or modulate your own viewpoint as a result.

Montaigne, the oft-touted father of the essay as a form of literature, in fact explicitly wrote essays as a means of self-reflection and self-exploration.

This isn’t some technical paper coming from a research lab or standards body, it’s someone interested in a particular topic sharing their thoughts on that topic, potentially influencing others and potentially being influenced themselves.

Re: Why Ruby Is More Readable Than Python

#99
post #69

Earlier quoted context omitted.

It's a bit of a weird take when attribute definition in Ruby also uses at signs specifically. Which part do you find ugly?

> It's a bit of a weird take when attribute definition in Ruby also uses at signs specifically. No that’s instance variables. > Which part do you find ugly? In Ruby to modify a method you just call a method. I guess I think a second, redundant, way to call methods is not elegant.

In Ruby if else is not a method for some reason also blocks are not objects for some reason "seems inelegant"

Re: Why Ruby Is More Readable Than Python

#100

The dunders in python make my eyes bleed. It stands out in an otherwise neat language, due to its significant whitespace.

When you need them, you need them, but apart from __init__ (and __str__ if you're doing Django) you mostly won't need to touch them. After working with the language a while, I honestly don't see them as ugly anymore.
Post reply on HN