r҉ustic cy͠be̸rpu̵nk🤠🤖 is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
r҉ustic cy͠be̸rpu̵nk🤠🤖 @cypnk

As far as I can tell, OOP has gone from paradigm to fetish

At this point, not only is it making code harder to understand, it's being used as a completely inappropriate cudgel to solve problems that really shouldn't exist in the first place

· Web · 1 · 5
@cypnk initial problem: global state is bad.
OOP: let's have state all over the place, but don't worry it will be hidden in objects.
Seriously though OOP can be good if you adhere to SOLID principles. Over-abstraction is against Liskov subst. priciple.

@cypnk I have recently switched and have not regretted a second

@cypnk A lot of people swinging too far on the functional side of the pendulum recently. I think there's probably a sweet spot somewhere between, where we minimize held state, but when we run into inevitable complexity we can divide and conquer the same way we did in imperative languages.

So, for instance, a factory is probably a pure function, not an object. A Sender is probably also a pure function. But the underlying stream has complexity we don't need to understand to use efficiently:Object

@falkreon I agree completely

I think it's also possible to get lost in the project such that there's little outside perspective to say "that's enough". Most of these are written in-house so there's no way to get feedback until it's mostly finished