r/programming • • Dec 02 '15

PHP 7 Released

https://github.com/php/php-src/releases/tag/php-7.0.0
887 Upvotes

729 comments sorted by

View all comments

146

u/johnasmith Dec 02 '15

For those wondering why there's a jump from 5 to 7, it's because the php 6 development branch was dedicated to full unicode support, but the work involved overwhelmed them, so they jumped to 7 to release new features without the unicode component.

9

u/LET-7 Dec 02 '15 edited Dec 02 '15

So Python actually successfully did this in v3+, right? Why do people peoples keep using python 2.7?

Edit: peoples prefer bad grammar

-1

u/lucasvandongen Dec 02 '15

Well you can have correct Unicode support or easy to work with strings but you can't have both:

Objective-C* vs. Swift

Python 2.7 vs. 3.x

*verbose, but not hard

1

u/tdammers Dec 02 '15

You can have both, it's easy as soon as you accept that "byte array" and "string" are different beasts, and you need to convert between them. Doing Unicode right is easy in every language that does this (C#, Java, Haskell), tricky but manageable in those that sort-of do (Python, mainly), and a train wreck in everything that doesn't (PHP, Perl, C, ...).

That said, Python didn't really add much in terms of Unicode support from 2 to 3, the difference is mostly that 3 is a bit stricter when it comes to converting, the names have been fixed, and string literals now default to unicode strings, not bytestrings.

→ More replies (8)