2 ms·
OOP is actually class oriented programming and classes are orthogonal the object/closure duality. For example in php class A { public $a = new B;} is not valid
by afiori 3y ago
OOP is actually class oriented programming and classes are orthogonal the object/closure duality.
For example in php class A { public $a = new B;} is not valid
https://onlinephp.io/c/31246 https://onlinephp.io/c/31246
Such a restriction makes no sense in a "closures are a poor man's object" world.
- gpderetta 3y agoNot sure what are you trying to say. My point was that a invoking a function that will act on arguments that have been defined away from the callsite is not a OO specific feature.