3 ms·
> Objects bind functions and data structures together in indivisible units. I think this is a fundamental error since functions and data structures belong in to
by ibeckermayer 6y ago
> Objects bind functions and data structures together in indivisible units. I think this is a fundamental error since functions and data structures belong in totally different worlds. Why is this?
> *Functions do things. They have inputs and outputs. The inputs and outputs are data structures, which get changed by the functions. In most languages functions are built from sequences of imperatives: “Do this and then that …” to understand functions you have to understand the order in which things get done (In lazy FPLs and logical languages this restriction is relaxed).
> Data structures just are. They don’t do anything. They are intrinsically declarative. “Understanding” a data structure is a lot easier than “understanding” a function.
Functions are understood as black boxes that transform inputs to outputs. If I understand the input and the output then I have understood the function. This does not mean to say that I could have written the function.
Mostly trivial definitions plus a bizarre definition of "understand" for functions, the relevance of which is unclear.
> Functions are usually “understood” by observing that they are the things in a computational system whose job is to transfer data structures of type T1 into data structure of type T2.
Not even true. Oftentimes a function's job is to change the state of a data structure, or compute a new structure of the same type.
> Since functions and data structures are completely different types of animal it is fundamentally incorrect to lock them up in the same cage.
Sloppy metaphor that doesn't follow from any of the previous gibberish.