Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I cannot upvote this enough. The "silver bullet" bit is the primary point, though I'll say I've found very few actual uses of OOP-as-described-in-the-mainstream in my ~30 year carreer.

Polymorphism, sure! Composition, sure! Information Hiding[1], sure! Modularity, sure! Implementation inheritance, ooh, sounds interesting[2].

The only problem with that sales pitch is that you don't actually have to combine all of them into a single concept ("OOP"). They are pretty much all orthogonal.

[1] That's was actually called Abstraction before "OOP" was invented as "a thing" in the mainstream. Well, it still is, but it's just that it applies beyond "public/private/package" scope (and the like). For example, O'Caml has "modules" which give you abstraction at what would be equivalent to Java's package scope. Amazing, I know. /s

[2] To be fair, I was absolutely entranced by the promise of implementation interitance[3]: What can I say, I was young and naive, and knew only Turbo Pascal and Delphi. With considerably more experience I consider it a fundamental mistake to include such a construct in your language.

[3] As was the rest of the industry, at least I had the excuse of inexperience. Such mistakes we've (collectively) made! :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: