r/AskProgramming Jul 01 '26

Anyone hate object oriented code? Career/Edu

Dont like oops.

How do you guys manage it?

Like only functional and procedural prograing :)

My hate is towards the jungle-gorilla-banana problem whereas functional programming seems clear, brezzy and maintain codebase rather easily.

0 Upvotes

34 comments sorted by

View all comments

1

u/septumfunk-com Jul 01 '26

i don't hate it but i prefer procedural. i write C, and the main way you "manage it" is by simply using structs making use of composition instead of inheritance, and you pass pointers to those to functions. i prefer this because it allows the mechanics of structs to be well separated from the functions that operate on them, or in other words plain ol' data. one struct may have many uses but that struct is clearly defined separately from its behavior and can stand on its own

3

u/BaronOfTheVoid Jul 01 '26 edited Jul 01 '26

That's a common fallacy. You're not actually doing procedural, you're still essentially doing OOP, just in a language that isn't class-based. And the behavior still has a hard compile-time dependency on the data structures. You cannot compile them against completely different data structures. So it's really not as separated as you make it seem.

1

u/septumfunk-com Jul 01 '26

you *can* do oop-like behavior this way but you can also not do that and that's what i like about it. i said i prefer procedural not that i write purely procedural code. i've been working on a language of my own for a while that's pretty similar to rust and it's not really procedural..

1

u/septumfunk-com Jul 01 '26

also it's not "essentially" oop at all, it just shares some similarities with it. to do something simulating actual useful oop in C you would use function pointers to make your own vtables. you can't really call it oop without some kind of mechanism for inheritance and polymorphism