4 ms·
Very interesting! Are you thinking something more along the lines of Python's "batteries included" style standard library? Also, it'd be great to move away fro
by dhotson 15y ago
Very interesting! Are you thinking something more along the lines of Python's "batteries included" style 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.
- philsturgeon 15y agoThat 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".
- yuri41 15y agoI 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.