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

Absolutely is.

Modern OOP (not the original OOP by Alan Kay) is a human anti pattern.

It commits the cardinal sin to easy to understand systems: It hides state, and breaks data lineage.

In otherwords:

1. You cannot just go back up the stack to see if anyone has changed data you depend on. You also need to follow all parent and sibling branches.

2. And in the case of inheritance you cannot reason about Child A without understanding Parent 1..N

As a result OOP systems quickly hit the limit of context one developer can hold in their brain when developing and debugging.

FP on the other hand encourages and in some cases enforces you to encapsulate the inputs and outputs of your system to the arguments and values of a function. Making the system easy to reason about at any level.

Powerful composability and more thorough and easy testing are just beautiful by products.

Next on the list of worst things to happen to programming is Python's popularity as a CSC101 language, and its toe hold in mathematics with the rise of ML.



The interpretation of Alan Kay's view on OOP is that it's not objects that are important, it's messaging.

https://wiki.c2.com/?AlanKayOnMessaging


Which shows, once again, that naming things is hard. Should've called it Message Oriented Programming.


> Next on the list of worst things to happen to programming is Python's popularity as a CSC101 language

My school kept track of computer science graduates, and the numbers dropped sharply after copying MIT's example for their intro course. And predictably it was 4 years after the change.

Some might call that "Gatekeeping" (though that's a more recent word in the vernacular), but I think it's more 90% of the jobs were C/C++/Java back then, and a BS degree was meant to get a graduate in a job in the real world.

Also students dropping out of the computer science program wasn't a great look when requesting funds for servers and stuff.


Since you are all so enthusiastic about Kay's idea of object orientation, you should take a look at Wirth's Oberon language and operating system, which is inded a message-based object system and uses a message-passing architecture rather than virtual method dispatch (in contrast to Smalltalk): https://www.projectoberon.net/


Spot on. OOP is too easy to cause cyclomatic complexity unless you understand the domain beforehand, and that's often not the case.




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

Search: