News for hackers. Stuff that matters.
Re:The Case Against OOP Is Wildly Overstated by addicted44 on Friday July 31, 2020 @01:11PM (#24010832)
Eventually data has to be bound to code. Otherwise you'd have apps where you either have functional code running and other apps that are displays of raw data.

The engineering question is what layer is it appropriate to do so. Under traditional OOP (your pre functional forward Java/C#/OOP C++), the answer was that code is almost always bound to data.

Haskell style functional programming binds code to data at the last moment possible.

The best answer is likely somewhere in the middle, depending on your application and usage. I find, for example, that UI controls work well with OOP, but most other stuff I tend to default to functional style programming.

Re:The Case Against OOP Is Wildly Overstated by demux on Friday July 31, 2020 @07:31PM (#24015593)
Declarative programming is also an option, where data is directly encapsulated into state, and programming entails describing the state transitions. SQL is a basic example of this, but it's also generally possible in other languages (eg template metaprogramming in C++). Prolog is a really cool language that operates solely on this principle.
Re:The Case Against OOP Is Wildly Overstated by mark-r on Friday July 31, 2020 @02:18PM (#24011785)
Yes, it does seem like OOP and functional are on opposite sides of a spectrum. OOP is all about having and controlling state, while functional is about being stateless. I think my own code would benefit from being more functional, but that's hard to do in a OOP infrastructure.
Re:The Case Against OOP Is Wildly Overstated by garethjrowlands on Saturday August 01, 2020 @09:22AM (#24020251)
Maybe try to aim for functional core, imperative shell, see https://www.destroyallsoftware.com/screencasts/catalog/funct...