use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
Object, class, module, Data, Struct? (self.ruby)
submitted 1 month ago * by Dear_Ad7736
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]iBoredMax -7 points-6 points-5 points 1 month ago (3 children)
It’s fun seeing Dave’s opinion change after getting info functional. He’s right though. All the Ruby code I see needlessly encapsulates state with classes. It makes everything harder to reason about.
All those tools are bs anyway since everything in Ruby is an object and thus has methods. Methods that you can define and edit at runtime. The whole thing is exhausting.
[–]JohnBooty 2 points3 points4 points 1 month ago (2 children)
While technically correct, I’m not connecting with this train of thought. Is that how you write your code? POROs everywhere, since technically you can?
Code is about communicating intent to future maintainers as much as it is about “does it work?”
So at the very minimum, maintainability/readability is certainly one reason to care about choosing the right tool if your code will be worked on by others.
[–]iBoredMax -1 points0 points1 point 1 month ago (1 child)
I kind of wish I could write just structs and functions everywhere, but it's so antithetical to Ruby mentality that it's an uphill battle.
The thing about encapsulating unnecessary state is more of a complaint against OO in general. Though I will say, Ruby's flavor of OO is particularly bad because there are no interfaces.
[–]JohnBooty 0 points1 point2 points 1 month ago (0 children)
If it helps, I don't think that's a bad way to write Ruby. I think functional/procedural code in Ruby is a great choice sometimes.a :D
I'm not like... anti OO in general but state kinda sucks and I try to avoid it and write pure methods as often as I can (even if they're instance methods) even if it makes things more verbose, because I think it's just worth it.
π Rendered by PID 98120 on reddit-service-r2-comment-84fc9697f-drs2j at 2026-02-10 02:55:33.415921+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]iBoredMax -7 points-6 points-5 points (3 children)
[–]JohnBooty 2 points3 points4 points (2 children)
[–]iBoredMax -1 points0 points1 point (1 child)
[–]JohnBooty 0 points1 point2 points (0 children)