3 ms·
It's weird because OOP and Procedural kind of go hand in hand. If you program in Java likely you're doing both procedural and OOP. And the technical definition
by leafboi 6y ago
It's weird because OOP and Procedural kind of go hand in hand. If you program in Java likely you're doing both procedural and OOP.
And the technical definition of OOP isn't formalized either so in some cases you can do FP and OOP at the same time as well. However, mutation is very very often used with OOP so if mutation encompasses the definition of OOP then it remains separate from FP.
Either way as you go up the ladders of abstraction things become much hard to control.
I think LP is the theoretical next step.. the next level of abstraction. It's like 3D printers. We want to build a 3D printer that can print out a working motorcycle but without fine grained control over the process it's hard and still WIP.
Above LP would be like alexa or google home. Imagine trying to build something by describing it in the english language.
Either way the reason why LP is not pervasive is because programs are generally fine tuned precision parts. It's the same reason why we still build houses with construction workers not 3D printers. The closest you get to LP in the real world is SQL. The problems I describe are evident for experts in SQL. SQL experts are largely people who "hack" at the syntax trying to bend it in arbitrary and unexpected ways to get a performance boost.
stuff like
SELECT * FROM TABLE_WITH_TWO_ITEMS;
vs.
SELECT item1, time2 FROM TABLE_WITH_TWO_ITEMS;
are just arbitrary hacks that have no surface level meaning. (Supposedly the second expression is not as performant in case you're not that familiar with SQL hacks). I guess a good way to describe this are the words "leaky abstraction."
If we move too far in the declarative direction we tend to hit more and more leaky abstraction problems. Essentially the programmer needs to understand the surface API as well as the internals. Additionally Lower level optimizations begin to be expressed as high level isomorphic expressions with no explicit reasoning (IE sql syntax does not explicitly tell you why item1 and item2 are faster then *).