4 ms·
> Surely this is different from a stateless pipeline of functions where data is put into the front of the pipe And a new value pops out of the other end of the
by tmcb 7y ago
> Surely this is different from a stateless pipeline of functions where data is put into the front of the pipe And a new value pops out of the other end of the pipe.
By no means I want to sound inquisitive, but, if it is different, how is it? Is one of these models (OOP and functional) a subset of the other? If so, do they represent levels in a given hierarchy? If not, do they even intersect? Are dissimilar properties complementary?
- crimsonalucard 7y agoa turing machine is isomorphic to a lambda machine. You can build a turing machine in a lambda machine and a lambda machine in a turing machine. A lambda machine is basically a functional program. https://www.wikiwand.com/en/Turing_completeness https://www.wikiwand.com/en/Turing_completeness Procedural programming and functional programming occupy the same level in this sense. I know of no "theory" that describes the evident dichotomy between the two. Lambda calculus is different from a turing machine simply because it feels different. Just like there is no theory illustrating the difference between JAVA and elixir. The only theory available says that everything is the same if it's turing complete. As i mentioned before however, there are issues with things that can actually exist in reality. I do not believe an actual lambda machine can be built in reality but in the theoretical world you can if you wanted to define something as "lambda complete" you could and have the lambda be the basis of things. As for OOP and functional programming, again there is no formal description of the dichotomy. In fact there is no formal description of OOP. OOP is not part of computability theory and to my knowledge not really studied by theorists. OOP is just a popular style that exists in the business world. So in short the available academic knowledge implies that all of these isomorphisms occupy the same level. That is there is no hierarchy or no one has tried to map a hierarchy yet. You might be right that there is a hierarchy. I would think lambda calculus sits at the apex simply because lambda calculus separates the concept of state and function while OOP and turing machines combine the two primitives (Object = (state * function)). However from other perspectives, there is no real world analog of a lambda calculus machine so from that perspective you could organize the hierarchy by putting OOP or the turing machine on top because it can exist in reality. But like how the number 1 is made out of three primitives that don't exist in reality: (-1 * i * i) I would say the smaller division of primitives is the more fundamental concept and therefore higher on the hierarchy.