logoalt Hacker News

whattheheckheck01/22/20252 repliesview on HN

What do you work on that avoids oop code bases?


Replies

sunshowers01/22/2025

I've written Rust full time for the last 8 years, being part of teams that have shipped several large, transformative, and basically correct projects. No OOP in sight. It's wonderful!

sirwhinesalot01/23/2025

At work we sadly have to implement very OOP-y standards with all the bullshit that entails. 11 levels of inheritance with overrides all over the place sure isn't fun to deal with.

But for things I do myself I use objects and interfaces strictly as a tool to solve specific problems, not as the overall program structure.

Most of the time you just need to turn some bits into other bits with a function, no need to overcomplicate things.

The question of if a square is a rectangle or a rectangle is a square is the sort of thing that comes from OOP brain-rot. They're just data, and their "isa" relationship is likely not even relevant to the problem you're actually trying to solve, like displaying them onscreen.

A "square" could be a function that makes a rectangle out of a single float. A "rectangle" could be a function that produces a polygon. The concepts need not be modeled as types or objects at all.

It depends on the actual use case.

show 1 reply