Hacker News new | ask | show | jobs
by afiori 1093 days 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

Such a restriction makes no sense in a "closures are a poor man's object" world.

1 comments

Not 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.