9 ms·
It's structural. class X: constructor(y=3,z=2) y; z; b = [......] F(x) = y + x F cannot be reused outside of the context of X and z
by Geminidog 6y ago
It's structural.
class X:
constructor(y=3,z=2)
y;
z;
b = [......]
F(x) = y + x
F cannot be reused outside of the context of X and z y and b. This is not a philosophical issue but concrete.
G(x, y) = y + x
Here G has the same exact logic as F but can be reused and is more modular. No philosophy of fuzzy stuff here I am talking about a concrete problem.
Philosophical arguments lead to unresolved controversies. I am not going in that direction. I am talking about a concrete issue that can be resolved.
- dnautics 6y agoI think parents posters idea about reuse is that if you need to reuse it, you make it into an abstraction and hoist (copy/paste) to a superclass and make where you took it from a child class. On the one hand, it does make the reuse explicit ("explicit is better than implicit"). Or you broaden the member elements to be able to take a broader interface. On the other hand, this is how you wind up with enterprise java.