Hacker News new | past | comments | ask | show | jobs | submit login

Oh for god's sake. Kill the damn thing already.

PHP 4 to 5 was a massive leap compared to Python 2 to 3, but they actually made that leap!




Amongst others, the Mercurial devs talked to Guido during Pycon about the huge porting effort towards Python 3 (with little benefit to the hg codebase). Let's not forget that Python itself hosts its code on http://hg.python.org. And during Guido's keynote (which should be online tomorrow) he said his own Dropbox has a huge Python 2.x codebase live on the servers which is difficult to migrate.

He didn't take the decision lightly. These are just two examples, but there's still lots of big Python 2.x uses out there.

If it's any consolation, his keynote started with a big "forbidden" sign over "2.8".


Captain hindsight then to the rescue, py3 shouldnt have existed and a 2.8 should habe been made.


PHP5 was almost completely backwards compatible with PHP4, Python 3 has much larger changes.


Just the entire OOP system changed.

However, nobody noticed because nobody used the OO features in PHP4.


To this day, old PHP 4 objects code still works in the lastest PHP version

The difficulty of upgrade for PHP didn't come from the devs having to redo / revalidate parts of their code for little to no immediate benefit (like in Python's case) but in the shared hosting companies (un)willingness to make the upgrade when the scripts their users wanted (phpbb, wordpress, ...) worked fine with PHP 4.

And that's why these various projects agreed to a common date of "end of support" for PHP 4, sending a message to hosting companies to either upgrade, or not be able to deploy wordpress and co anymore


I know of a small company (won't publicly shame them) that to this day is actively developing a php 4 code base. The reason is that they use a couple of libraries which do not work in php 5 and don't have the time/manpower to port it.


Do you know what libraries can't be ported without a lot of effort? I haven't heard that in a long time.


Automattic isn't a small company.


Automattic is running PHP 5.4 on their servers, I believe: https://github.com/Automattic/prefork


He was trying to take a cheap jab at wordpress


The point from jiggy2011 is rather that the differences from PHP 4 to PHP 5 didn't break much of the existing PHP4 code.

In PHP 4 for example you had an object model where the constructor was a method named alike to your class. In PHP 5 you got the __construct() magic method, but as a fallback, the method named to your class still works as constructor.

The same holds for properties defined with var instead of public/protected/private. For compatibility again, the var keyword is just interpreted as a public property.

As a third example, PHP5 came with an OOP system with support for interfaces, abstract classes and the final keyword. In PHP4, this wasn't available. So, there is no PHP4 code which uses these concepts, making them work in PHP5 as well. Obviously, this doesn't work the same way around.

There are some backwards compatibility issues, but these are minor in contrast to what you probably had written in PHP4 back then [1]

Now, for Py2 vs Py3 this is a completely different story. Py2 code doesn't run automatically on Py3. See this answer [2], as there were so many porting issues developers didn't had the time to overcome the overhead just to port the code. So: no, you can't compare the PHP 4 > 5 change to the Py 2 > 3 change.

[1] http://www.php.net/manual/en/migration5.incompatible.php [2] https://news.ycombinator.com/item?id=7581584


IIRC PHP5 mostly added features to the OOP system so old code would still work even if it was suboptimal.


There was a massive push from the community for PHP5. They had a similar site to the Python3 WOS and large projects such as Wordpress and Drupal announced PHP5 only major updates. I would link it, but the domain has apparently been left expire and replaced with e-cig spam. So here's some link to comments about the announcement: http://www.garfieldtech.com/blog/go-php-5-go , and then a post about its impact and a desire to to the same again for PHP 5.5: https://groups.google.com/forum/#!topic/php-fig/ogp03OHbVJ0

There were a few reasons why they pushed harder with PHP5 however, especially given the tendency of budget web hosts to use old versions of PHP4 with insecure by default configurations (register_globals etc.).


Yes but PHP5 had compelling reasons for upgrading. py3 has a few tweaks and some annoying syntax changes to make things more "pure"


So, counter-intuitively, the bigger leaps are easier to make than the small ones!


Small ones as Py3, doesn't deserve a major version boost. It simply doesn't have that much to offer.


> py3 has a few tweaks and some annoying syntax changes to make things more "pure"

That may have been true of Python 3.0 vs. 2.x, but Python 3 has moved forward quite a bit since 3.0.


I think the point was there was no "OMG we need that, let's upgrade" feature for most people (unicode maybe).

e.g.:

  * Performance
  * Getting rid of the GIL
  * Improve multithreading (somewhat related to above) - multiprocess is still very bad performance-wise
A fair number of the things in 3.x could have been added to the 2.x series...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: