Re:Packages: The Way Forward for PHP
by philsturgeon on Tuesday March 06, 2012 @10:08AM
(#3671300)
That is what PHP are doing, but slowly. When features are added they are often as PECL or included as classes, and not as proceedural functions.
Moving forwards it seems like PHP is making the right calls, but backwards compatibility is important to the project as PHP has more legacy code than any other web language. That doesn't mean it's dead, it just means they can't say "sod it, lets re-write everything overnight".
I don't think that everything must be object oriented in the standard library, though I'm not a big fan of the functions in global namespace either.
The structure of Go's standard library could be a good inspiration for restructuring PHP's standard library.
Also, it'd be great to move away from PHP's functions-in-global-namespace style standard library, towards having a set of more well engineered core OO libraries. The first examples that come to mind are: OO strings and collections libraries. I'm thinking along the lines of Ruby's Enumerable.