Start Writing Ruby (Stop Using Classes) by Dave Thomas

I’ve watch Dave Thomas talk at San Francisco Ruby Conference 2025. You can watch it too on

I am wondering what you’re thinking about Ruby classes. Dave Thomas is explaining well but still I am a bit confused :smiley:

1 Like

I watched this talk and found it a bit condescending. But in a lot of respects I agree with him. I put business logic in single purpose classes. For example, if I have setup logic that goes alongside creating a user record, I’ll have a Users::Create “action” module with a single public method, .call. I’ll typically have these in an app/actions or app/domains folder.

1 Like

Entertaining talk. Definitely has some scorching hot takes :sweat_smile:

I sometimes agree, but there are definitely a lot of situations where I don’t. Mentioning ActionController is interesting, revealing that he probably thinks of “state” as something that must change over an instance’s lifetime. I personally like to extend that to also include data that can vary between different instances. So with a controller, the request params and cookie store vary from one request to the next. If you don’t initialize an object with that state, then every single controller action would have to accept request data as a parameter(s).

module PostsController
  def index(request_data); end

  def show(request_data); end

  # etc.
end

# because this is Ruby, you undoubtedly could hack this such that
# mixing in some "controller" module makes data about the request
# available in every method. But at that point: is it really simpler
# than using a base class with inheritance?

I dislike data clumps, and not just because some people in the 90s wrote about how they’re bad for C++ or Java or whatever. Not needing to spell out such boilerplate all over the place is one of the main things I enjoy about Ruby/Rails.

1 Like

Is there a slide deck available?

I looked at my copy of his Ruby 3.3 and he wasn’t thinking that way then.

I don’t think so. At least, it doesn’t exist in rubyevents.org