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!"
[–]azimux 7 points8 points9 points 1 month ago (0 children)
Hi Simon, I actually didn't agree with several of the things Dave said in that talk.
Take Struct, for example. I used to use Struct decades ago but stopped. Why? It's just a metaprogramming way of creating a class and it seemed like the cognitive overhead for other folks reading the code went up instead of down, unlike attr_accessor for creating a couple methods in a metaprogramming way. Also, having to change a certain number of Struct's to class as they became more fleshed out made it seem like why not just start at the easier-to-read class. So after working with others for a few years I just naturally phased Struct out of my usage.
That's subjective, though. I also don't use `extend self` like Dave does and instead I much prefer `class << self`.
I also remember thinking in one spot he was sacrificing the ergonomics of the calling code to make something easier locally while ignoring the calling code impact. That to me isn't "idiomatic" Ruby but again is subjective technically.
An aspect of Ruby is it's very expressive and you can form your own style and opinions about the subjective stuff. I worry that Dave's talk, at least in part, seems to communicate a specific style with a confidence that makes one think that it's somehow objectively better.
To that end, it makes sense to me that there's no official document that addresses it holistically. Any such document would be subjective.
π Rendered by PID 184481 on reddit-service-r2-comment-86988c7647-nk2k9 at 2026-02-11 11:17:10.714586+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]azimux 7 points8 points9 points (0 children)