On 31/07/2016 15:37, Dan Ackroyd wrote:
All PHP programs start in procedural code, and then require some bootstrapping before we can enter the lovely world of OO code.
I think it goes deeper than that: the procedural code is not just outside the objects, it's inside them too. The body of every method is a procedural list of statements and control structures. If you have a single "if" or "foreach" in your code, that's procedural code; if you have a method with more than one statement, that's procedural code.
It's possible to have a "pure OO" language - take a look at Self or Smalltalk, where even "if" is a method call; or there's functional programming, where you try to "compose" actions, rather than declaring a sequence of them. But PHP, like Java, Ruby, Python, etc, etc, is at heart a language where you say "do this, then do that"; changing that isn't a minor enhancement to the language, it's a completely different approach to program structure.
If the problem Midori is trying to solve is to do with bootstrapping, or dependency management, then I agree that a framework of some sort is the way to go. The boring glue code is all still there, but you don't need to look at it; ultimately, that's all a language feature could do anyway.
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php