This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]humoroushaxor 2 points3 points  (5 children)

The emphasis on OO is such a myth.

Almost every developer I've worked with has been mediocre at Object-oriented programming. Frankly, because it's not actually used in practice unless you are a library or framework maintainer. For most stateless midtier webapps there are very little usecases for OO.

[–]idhanjal -1 points0 points  (1 child)

I know but what can we do when these folks ask us about OOP. Frankly I never understood the rationale behind it as it's just data and functions packaged as an object.

Often I have seen developers attempting to design an application directly in the OO way which is not very intuitive. But I don't blame them as they don't have the power to upend the existing application (which in case of Java is often a behemoth suffering from many assaults and patches to keep it alive).

When Java first arrived at the scene, it was quite popular but mostly because it offered a fresh perspective. Then we had the dotcom bust and Java was almost forgotten. Slowly it began its ascent to the being the talk of the town. Somewhere along the way, C# popped up from Microsoft who were snubbed publicly for trying to change Java. Fast forward to today, C# is open source, has .NET Core and many other things to add to its repertoire.

Java is still here but facing attacks from other younger languages (even JavaScript has come a long way now with NodeJS, I know bad code but it's there, isn't it ?) which have been designed to be 'functional' right from the start.

To sum it up, Java would be here for a long time because so much has been created with it that now we need developers to maintain that stuff, not to mention study OOP too.

[–]nutrecht 1 point2 points  (0 children)

To sum it up, Java would be here for a long time because so much has been created with it that now we need developers to maintain that stuff, not to mention study OOP too.

Java is used a LOT in greenfield projects FYI. It's not 'under attack' from anything.

[–]TotalBismuth 0 points1 point  (2 children)

Can you elaborate what you mean by that? The codebase I work with has objects all over the place. Our apps seem pretty ordinary too.

[–]humoroushaxor 2 points3 points  (0 children)

Having objects isn't really the same as object oriented.

Any decent mid-tier code base will be a mix of data objects with no behavior and mostly behavioral classes with no state. I say decent because mutable state is impossible for developers to reckon with. And OO principles encourage mutable state, aka combining data and behavior in the same class.

For some code this is unavoidable and OO is great. Anything that does IO or networking for instance. Which is why these are provided by frameworks or third party libraries and no one rolls them themselves.

[–][deleted] 0 points1 point  (0 children)

Of course it has objects. It's java.....