3 ms·
i would love to see them make an explicit BC break and fix everything listed at http://phpsadness.com/ http://phpsadness.com/
by leeoniya 13y ago
i would love to see them make an explicit BC break and fix everything listed at http://phpsadness.com/ http://phpsadness.com/
- shocks 13y agoYeah, because that worked out SO well with Python… ;P
- jmccree 13y agoIt amuses me people want PHP to follow the path of Python or Perl. On the latest version of Ubuntu: PHP 5.5, Python 2.x Perl 5.x. PHP has gradually improving, adding functionality, and spreading minimal BC breaks over a long period. If PHP had went the PHP 6 route back round ~08, it'd likely be split into two projects already, splitting up the community with it.
- wvenable 13y agoIt happened with PHP4 -> PHP5 already. That was a huge split.
- wvenable 13y agoIf you break BC you might as well just another language, because that's what it will be. The correct approach is slow and steady improvements. I suspect standard library improvements will come not by renaming existing functions but by adding new API.
- BugBrother 13y agoThe Perl way is to declare minimum language version to execute a code file. E.g. use v5.12; Then you can do extensions [even changing central functionality] in a sane way, with backward compatibility. (A language implementation need to implement deprecated features for older versions, of course.) I agree with your point re APIs.
- wvenable 13y agoI've had this idea of minimum language version as well. In PHP it should probably done at the namespace level. It doesn't even need new language syntax, just a function to declare the minimum PHP version for a namespace and child namespaces: set_minimum_version('My/New/Component', '5.7.8'); This could be called in the component itself or maybe by a composer autoloader. Then PHP components that expect different version could live together. The big problem, as you mentioned, is that the interpreter would have to maintain all the deprecated features and behavior for older versions and that would make development and maintenance of PHP much more complicated.
- oafitupa 13y agoThat's what we do with Composer, we set the minimum PHP version.
- krapp 13y agoI've done and seen it done in wordpress plugins, sometimes.
- NameNickHN 13y agoAnd thousands of developers would hate it. Sure, some things are ugly but the usage is too widespread in order to get rid of them. Look at the register_globals disaster and how long it took to throw that out. And it was only one little thing. Imagine tens or hundreds of them.