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

Show parent comments

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.

1

u/masklinn Dec 11 '15

C# and Java most certainly don't do unicode right.

→ More replies (1)