3 ms·
Let this (and Perl 6) be a lesson to language designers: do not make backward-incompatible changes, ever. It cripples adoption. Java managed this much better by
by pjc50 10y ago
Let this (and Perl 6) be a lesson to language designers: do not make backward-incompatible changes, ever. It cripples adoption. Java managed this much better by being able to mark APIs as "deprecated".
- berntb 10y agoYou got a point I agree with but a bad example since Perl 6 is a new language. (That the name don't reflect that is still a heated discussion.) (And Perl 5 code can declare which of the newer features it will support. Excellent backwards compatibility.)
- dri_ft 10y agoThen again, continuing to add backward-compatible changes to Perl 5 would have made it an even bigger pile of mud than it already is. Its refusal to make backward-incompatible changes is both the reason why Perl 5 was so ubiquitous and why it's so very ugly. So I can certainly understand the desire to start afresh with 6, in spite of the costs in terms of adoption. It does seem like take-up has been low so far, but it's probably still too early to call whether it will turn out to have been the right choice. I'm less familiar with Python, so can't really comment on there, but it does seem that Python 2.7 had fewer egregious faults than Perl 5.
- berntb 10y agoThere are quite a few backwards incompatible extensions for Perl 5. But you must declare what new features to use. Then there is Devel::Declare etc with extensible syntax... :-) http://perldoc.perl.org/feature.html http://perldoc.perl.org/feature.html
- moduspwnens14 10y agoI think the main change (accurate handling of strings potentially encoded with multiple bytes) hit a lot of languages from that time in bad ways. I think it's something that more or less had to be done since the alternatives are worse, but we haven't seen a similar issue pop up in a long time. I don't think the lesson applies in many other places. Certainly open to my mind being changed, though!
- Jach 10y agoI don't take this lesson. Java also managed by adding new features sorely desired. PHP 4 to 5 was great. PHP 6 is a story much like Python 3, but the PHP community had the good sense to abort it instead of forcing everyone along and PHP 7 will probably not take long to move to. Perl 6 can run Perl 5 code, not sure of your point there, I think the issue with Perl 6 is just how big it is. The only feature that intrigues me anymore there is making grammar-parsing as easy as regexes. Python 3 had no carrots, as others mention it only seems like now it's got enough going for it to be worthwhile. That's the lesson even Microsoft forgets and relearns continuously: if you're going to push out a major upgrade, you better have nice carrots attached. The stick only approach doesn't work when there is competition, and Python has plenty of competition, lots of it just with itself.
- username223 10y ago> Python 3 had no carrots,... The stick only approach doesn't work... I don't use Python for any serious development these days, but this is my impression as well. Python 3's promise was "we'll break all of your code in exchange for a few minor things some people think are improvements." When users balked, the devs decided to force the change by brow-beating and shaming users, with predictable results. Perl 6 had lots of carrots, but was so different that the only plausible portability story was to run existing code in an embedded Perl 5 interpreter with some kind of interoperability layer. It's a new language, still looking for its niche. Ruby devs were so used to breaking changes that they considered porting to 1.9 to be more of the usual. Meanwhile, C and C++ happily coexist, despite major divergence by C++ and minor incompatible changes by both languages.
- bhaak 10y agoI actually don't know why it's been such a big pain with Python 3. Ruby 1.9 also fixed the accurate handling of strings potentially encoded with multiple bytes. Fast forward to today, we didn't have such a turmoil like with Python and now, not even Ruby 1.9 is supported by the official devteam anymore. And there is nobody holding out on 1.8 anymore. Compare that to Python 2 which will still be supported until 2020!
- dagw 10y agoOne big difference between Ruby and Python (and one of the big reasons that I think python3 failed to take off) is that the Ruby community has been much better at making sure that their major third party libraries are in sync with the core language. I don't remember the exact timeline, but basically when Ruby 1.9 came out you could more or less instantly start using it with RoR so there was no reason to wait with experimenting with it. When python 3.0 was released both django and numpy where still years away from getting official python 3 support into their releases so no one bothered to invest too much time into it, and this caused a major loss of momentum that is only today starting to slowly return.
- moduspwnens14 10y agoTo some extent, I think it's reasonable. PHP had the same issue (old libraries assuming single byte strings) and the way they handled it is pretty awful. Essentially all string manipulation functions also have an equivalent function with the same name prefixed with "mb_", which works for multibyte strings. The practical effect is that people use the default string functions and then things break when multibyte strings start showing up! It is backward compatible, but it's certainly ugly and that's quite a tradeoff.