Ask HN: What are alternatives to OO programming?
Don't say functional. It combines the power of abstract mathematics with the learning curve of abstract mathematics. Any programming paradigm that requires me to write a dissertation to use shouldn't morally speaking count as a programming paradigm.
I want a programming paradigm that doesn't breakdown after 500k LOC. That rules out structured programming also.
9 comments
[ 2.9 ms ] story [ 33.0 ms ] threadIMNSHO, architecture-oriented programming is what OO wanted to be. Or maybe it should be called connector-oriented.
In short, in addition to a library of data types / classes you can use, compose and adapt, you get a library of connectors you can use, compose and adapt.
Another way to think of it is tamed metaprogramming or language-oriented programming on rails.
If you are having difficulty with OOP & objects, then go through the reference, but do it, there's no better mainstream alternative.
* Has the gentle learning curve of abstract mathematics.
No thank you.
Was it easy to learn how to do OOP well? If you're looking to move away from OOP, are you sure you ever learned how to do it well? I've been doing OOP for 20 years and I've found far more practical application from functional ideas than any design patterns I've come across.
You don't have to go all in on any paradigm, you can mix and match. The parts of any system should be small. If the part is easier to design in OOP (UI comes to mind), then use that. If the part is just manipulating data (just about everything else comes to mind) functional can be very nice.
OOP is one of the few parts of programming that are genuinely enjoyable. Sometimes I open up Ruby and make an OO model of something from my work (mathematician). So I'm not asking because I'm bad at it.
But it seems like there are only two programming paradigms: object-oriented and structured (classical functional programming (like you find in Scheme) is really structured programming without loops and variable assignments). And the problem is that structured programming is not temporally infinite: it breaks down most ungracefully past 150k lines of code.
You can't tell me that the only temporally infinite programming paradigm is OO and that nobody invented anything else in the intervening 30-40 years.