5 ms·
>Because you seem to continue to think that procedural composition is impossible even though it's literally the thing that allows functional composition to exis
by crimsonalucard 7y ago
>Because you seem to continue to think that procedural composition is impossible even though it's literally the thing that allows functional composition to exist on actual physical computers. That you continue to deny this suggests that somehow you are not in the category "everyone".
It allows it to exist in computers because that is the type of machine that we've physically built.
Theoretically, functions and procedures exist side by side one is not better than the other.
Composition exists in computers not at the primitive instruction set level. It exists as a higher order operation that occurs as a phenomenon when lower level procedures are executed in a certain order. There is no compose procedure that exists in assembly language.
>Again: procedural composition is a dependency of functional composition as soon as you move from theory to practice. That's what you don't seem to be getting.
No you don't get it. In theoretical computer science both functions and procedures exist side by side neither depends on the other but in theory we can construct both concepts with functional or procedures as the basis. It is because we happened to invest a lot of research in building physical machines that are procedural that makes this a dependency in physical machines. It is NOT a DEPENDENCY in COMPUTER SCIENCE.
> and you seem to have drank so much of the FP Kool-Aid to have forgotten how computers actually work.
I seem so? Then why am i describing everything from the instruction set level and up. I know how it all works. both in theory and physically. You seem to be lacking the theoretical and mathematical basis. You claim to work in the real world yet you keep talking about composing useless things together without context.
>Trying to cite some purely-theoretical concept as "proof" that an actual working system can operate without numbers is not proof at all.
Did I not tell you to check out the Nat type in Haskell, Idris or Coq? This is not only theoretical it can be on a physical computer and actually is used for dependently typed languages.
>You call that "leakage", I call that "making it actually useful in the real world". A function is meaningless unless it has something to, you know, actually operate upon.
Right and when did I say a function isn't doing anything in the real world. You can do real world calculations on a real world computer with functions all the way down. Get it?
>Yes, because executing one thing after the other is "bending". /s
Executing one thing after another is not composition. Composition requires something to be combined with another.
>whether or not they should be composed is different from whether or not they can be composed.
The canonical definition not the hand wavy one that spans across arbitrary languages defines composition as something that can only be composed if they should be composed via the type system.
---
I defined the composition definition at the beginning of this topic. I have told you repeatedly to stick with it. Object composition as defined by anyone is hand wavy.
- yellowapple 7y ago> Theoretically, functions and procedures exist side by side one is not better than the other. You've just spent multiple days arguing with me about how one is better than the other. Glad you finally agree with me, though. > Composition exists in computers not at the primitive instruction set level. Yes it does, because even instructions can be composed by executing them sequentially. Whether or not it's useful to execute them sequentially is a separate concern, just like whether or not it's useful to convert sunlight to distance is a separate concern. Instruction composition enabled procedure composition enabled function composition. > I know how it all works. both in theory and physically. Then why are we still having this conversation? If you know how computers work physically, then you'd know that procedures can be composed, and that the composition thereof is exactly why function composition is possible on real computers. > Executing one thing after another is not composition. Composition requires something to be combined with another. Which you can do with procedures, by defining another procedure which executes one after the other. > The canonical definition not the hand wavy one that spans across arbitrary languages defines composition as something that can only be composed if they should be composed via the type system. Nowhere in the actual definition of even function composition (let alone composition in general) is that constraint present. Like, that doesn't even make logical sense. Because I shouldn't eat donuts for dinner means I'm physically incapable of eating donuts for dinner, by the rationale you're presenting. > I defined the composition definition at the beginning of this topic. And the definition you provided is not the one used in computer science.
- crimsonalucard 7y ago>You've just spent multiple days arguing with me about how one is better than the other. Glad you finally agree with me, though. You still don't get it. What's coming out of you is this: Functions exist because of procedures. I was never in agreement with this statement. Stop twisting your own words. We are not in agreement because you literally said that functions are built on top of procedures when it's really just an isomorphism. Again. Everybody knows this, except you. Yet you were trying to drill this single minded concept of functions are made out of procedures into my head. You literally never got it. The reality is, neither is made out of neither, they are just equivalent or in other words isomorphic. >Yes it does, because even instructions can be composed by executing them sequentially. Whether or not it's useful to execute them sequentially is a separate concern, just like whether or not it's useful to convert sunlight to distance is a separate concern. There is a MOV instruction a CPY instruction. some arithmetic operations. Tell me where is the COMPOSITION instruction. None. Composition exists as a concept of multiple instructions not as instruction itself hence not a primitive. >Then why are we still having this conversation? If you know how computers work physically, then you'd know that procedures can be composed, and that the composition thereof is exactly why function composition is possible on real computers. We are having this conversation because YOU don't know what you're talking about, BUT you think you KNOW, and I am trying to tell you WHERE you are wrong. That's why we're having this conversation. >Which you can do with procedures, by defining another procedure which executes one after the other. How does executing one step after another compose anything? What is being composed? How is it being composed? Does the execution of consecutive steps always mean something is composed? You haven't defined anything. What's going on in your forth example is that you are executing specific steps in a way that imitates function composition. Sort of like using english words to sound out chinese words. You can literally achieve the same results but it is none the less an imitation because there is no COMPOSE instruction. Lets not talk about what how you imitate compose in a procedural language. You could literally do the same thing with functions and imitate procedures with composition. We both know this, so lets stop talking about the isomorphism everyone already knows about. >Nowhere in the actual definition of even function composition (let alone composition in general) is that constraint present. >Like, that doesn't even make logical sense. Because I shouldn't eat donuts for dinner means I'm physically incapable of eating donuts for dinner, by the rationale you're presenting. Did you not read the wikipedia article? The official canonical definition of mathematical function composition HAS TYPES DEFINED AS PART OF THE DEFINITION. Literally it's all there. I will directly copy the definition from wikipedia here: "In mathematics, function composition is an operation that takes two functions f and g and produces a function h such that h(x) = g(f(x)). In this operation, the function g is applied to the result of applying the function f to x. That is, the functions f : X → Y and g : Y → Z are composed to yield a function that maps x in X to g(f(x)) in Z." >And the definition you provided is not the one used in computer science. Computer science uses the canonical definition defined by mathematics. This does not mean a computer language uses the formal definition. A computer language can come up with all kinds of hand wavy definitions that can mean whatever the implementer wants it to mean. That's how object composition came about. Somebody decided to call it composition when really it's more akin to creating explicit dependencies. The computer science function composition page on wikipedia contains several definitions of function composition and a completely different definition that is very informal for object composition. The lack of formalism and multiple definitions mean that this page is more of a page of examples of what other languages call function composition rather than cannon. The formal definition is the mathematical definition and that is the best and most complete definition.