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

The OOP approach is to define your entire data model as a collection of classes and interfaces before you write a line of business logic. This approach is designed to support a systemic methodology for modifying and extending the codebase. But it also adds a complexity that requires large quantities of boilerplate to be written, and requires maintainers to navigate through several layers of abstraction if they’re trying to read or modify the code.

From my perspective, I see the rise of Node and Python for web dev as a rejection of OOP, largely on the basis that web apps don’t need such a complicated set of structural abstractions. However if you look at how that domain has been innovating, my argument is that they’ve simply recreated all of the old OOP abstractions with different names. If you look at the types of abstractions used, and their associated complexity, in a typical GraphQL + TypeScript application, how are they substantially different from full OOP C# app for example? Especially if you’re using an RDBMS, or ORM, or some sort of schema for a NoSQL DB. For devs that don’t like TypeScript, JSON Schema might be appealing. But if you look at the JSON Schema spec on GitHub, one issue you see repeatedly raised is “please add full inheritance”, followed by a debate around “but that’s just OOP”. The community’s raised that issue so many times that I think they’re actually considering it now.



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

Search: