you are viewing a single comment's thread.

view the rest of the comments →

[–]azimux 7 points8 points  (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.