In the rare case where you need runtime polymorphism it is nice. I also think people over use it (hello C#).
If you don't need it for polymorphism its only syntactic sugar anyway, and it gets a heck of confusing (imho) when people think it does s.th. else.
Like how does it make code cleaner when you put the sinus function into a class?
And while this might be an extreme example, you can have a function which operates on two data elements. But because your doing "OO", you arbitrarily put the function into on class. Everything else would be a code smell.
I dont think this is what OO was originally about, but it doesnt speak for the average developer what happened there...
If you mean static methods inside classes, I don’t think those are any different than a namespace. They should be thought as such (e.g. java’s Math::sin, not sure how it’s done in C#)
I mean both. Non static non virtual functions are essentially just normal functions where you don't see the "this" pointer. And you call ob.foo() instead foo(ob).
Of course it's better syntax and often convienient. But many people think there is more to it ("Im doing object oriented programming"), while it is semantically the same.
PS: I get that for namespaces it's not that bad. But still, why not use a namespace? Now you use classes for two completely unrelated things. Congrats Java and C#, your programming language needs one keyword less.
That’s just the “Turing-equivalency” argument, of course in the end we just jump to different points in the code. That doesn’t make it OOP nonexistent.
If you don't need it for polymorphism its only syntactic sugar anyway, and it gets a heck of confusing (imho) when people think it does s.th. else. Like how does it make code cleaner when you put the sinus function into a class?
And while this might be an extreme example, you can have a function which operates on two data elements. But because your doing "OO", you arbitrarily put the function into on class. Everything else would be a code smell.
I dont think this is what OO was originally about, but it doesnt speak for the average developer what happened there...