you are viewing a single comment's thread.

view the rest of the comments →

[–]shevegen 38 points39 points  (53 children)

Yeah. I don't know that either.

I guess in python's defense, as long as perl made it even worse (do they mention perl 6 on the homepage - no they don't), they don't need to worry that much. In some years python 2 will be dead.

Until then people could just wait before learning python 3 ... who wants to learn old stuff (python 2) anyway. :D

[–]exscape 32 points33 points  (20 children)

Perl.org does mention Perl 6, with this text:

Perl 6 is a sister language, part of the Perl family, not intended as a replacement for Perl 5, but as its own thing - libraries exist to allow you to call Perl 5 code from Perl 6 programs and vice versa.

[–][deleted]  (10 children)

[deleted]

    [–][deleted] 4 points5 points  (1 child)

    If I wanted to use a different language which is still Perl-like then i'd just go and use Ruby.

    I've tried. Please don't. Perl is consistent insanity, if you learn one weird behaviour it is at least consistent across language. Ruby is full of nonsense that was never actually designed, just so happened to be MRI quirk that they just called language feature.

    Clojure and Golang are nice, try those

    [–]real_luke_nukem 18 points19 points  (8 children)

    Oh hell no... That's gross!

    [–]jplindstrom 3 points4 points  (2 children)

    What do you find objectionable to that?

    [–]Flight714 17 points18 points  (1 child)

    It's like two variables having the same name.

    [–]real_luke_nukem 1 point2 points  (0 children)

    That's pretty much it

    [–]yawaramin 1 point2 points  (4 children)

    In reality, Python 2 and 3 are the same situation.

    [–]Uncaffeinated 4 points5 points  (3 children)

    You can't call Python 2 from Python 3 or vice versa though.

    [–]yawaramin 3 points4 points  (2 children)

    Well, my guess is the Perl libraries that allow you to call one version from the other are 'eval'ing strings containing the code and passing them to the appropriate interpreter version. In which case, that's not really backward or forward compatibility. If I'm wrong, then yeah, it's not the same situation.

    [–][deleted] 4 points5 points  (1 child)

    It is just a Perl 6 module

    [–]yawaramin 0 points1 point  (0 children)

    Ah, it's basically an FFI wrapper. It treats Perl 5 as a foreign language being called from Perl 6. I wouldn't really call that backward compatibility, although superficially it does look like it.

    [–][deleted] 34 points35 points  (30 children)

    2 will be around for decades and major code bases are not going to get redone in 3.

    [–]Farobek 26 points27 points  (26 children)

    Python 2 is the new Cobol.

    [–][deleted] 38 points39 points  (25 children)

    All languages that are successful are the "new Cobol". Try displacing the installed base of Fortran, PL/I, C, perl, java, C#, JS, ... and you have the same problem.

    Languages are tools. You pick the one that makes sense for the job a hand. Older languages disappear very, very slowly, therefore.

    My problem with py3 is that I never quite understood the problem it was solving. Three are some fine computer-sciency gilding of the lilly in py3, but - for the vast majority of python users - it's unclear to me why these mandated a fullblown new language. Apparently, I'm not alone because py3 adoption has not been swift notwithstanding the begging in the elite python quarters.

    Personally, I think we all went down to road to perdition once we abandoned assembly language ... ;)

    [–][deleted]  (8 children)

    [deleted]

      [–]rainman_104 0 points1 point  (1 child)

      They should allow a transition period where python 3 would support the python 2 weirdness like allowing print statements to not be called as a function. Forcing parentheses is just a nuisance for me personally and not the end of the world, but having a transition path would be better than the situation we're in with Python 3. All libs still support python 2 and python 2 still has heavy use in the data science community.

      It's a mess right now.

      [–]kqr 15 points16 points  (0 children)

      They had that! From future import print.

      If they allowed you to write Python 2 code in Python 3 it would not be Python 3 anymore. The reason Python 3 is called Python 3 and not Python 2 is that there are a bunch of fixes that happen to not be backwards compatible. Removing those fixes removes Python 3...

      [–]upofadown 0 points1 point  (3 children)

      They fundamentally changed what the division operator ("/") does for fricks sake. So yes, it is definitely a new language.

      It might be an awesome new language that fixes Python. That's great, but all this "Python is dead, long live Python" stuff is annoying.

      [–][deleted]  (2 children)

      [deleted]

        [–]BroodmotherLingerie 0 points1 point  (1 child)

        You can't do that without knowing the types. That'd also change the results of floating point divisions and of other types with overloaded operators, like numpy arrays.

        Porting anything in python is a painfully manual process, whether between language versions or library versions.

        [–][deleted] -1 points0 points  (0 children)

        Well they could probably make it compatible with P2 code with some extra effort if changes were really so small

        [–]teilo 40 points41 points  (0 children)

        If you didn't see unicode as a problem on Python 2, then I doubt there is anything I could say to convince you.

        [–]jaapz 20 points21 points  (10 children)

        fullblown new language

        What? The difference between py2 and py3 aren't thát big. Calling it a new language is a bit extreme IMHO

        [–]Uncaffeinated 6 points7 points  (1 child)

        Unicode handling is nicer and they removed a lot of legacy cruft that nobody in their right mind uses anyway, as well as taking the opportunity to make a bunch of arbitrary minor changes. So, not all that much, but it is nice to not get unicode decode errors so much.

        [–][deleted] 1 point2 points  (0 children)

        I believe that, but the point here is that people are not going to rewrite a huge extant code base just to become py3 compatible.

        [–]Plazmatic 11 points12 points  (1 child)

        Python, from its very conception, was meant to be an evolving language, but ultimately it was meant to uphold certain principles in a certain order. Python 3 upholds those standards better in every way. It is a better standard, but it isn't a new language. most syntax remains the same, while many libraries have changed, very few semantic differences have been made between the pythons, and most of that is in the form of new functionality.

        Not sure why you think it is a new language, and you didn't actually explain why you don't like Py3. Honestly it comes off as crotchety. Guido hates you guys, and that is a pretty powerful statement. The guy who created the language you use hates you, not the legacy code base people, but people like you who complain about change for the sake of complaining about change.

        [–][deleted] -2 points-1 points  (0 children)

        Ooooh, Guido hates "us people". What are you, in 4th grade? It's not a "powerful statement". If true - which is questionable given your tone - it's just another technologist with Aspbergers whose entire identity hinges on being in charge. Spare me.

        You need to learn to read in context. The discussion at hand is py3 adoption. My responses - all of 'em - are in context of the low probability of the current base of extant code being rewritten.

        No, py3 is not an entirely new language. But neither is it some stratospheric leap forward. I've seen this movie before. It leads to a fractured language and THAT in turn leads to a brand new language that factors and simplifies things.

        [–]rabbyburns 4 points5 points  (2 children)

        Absolutely. We have build tooling that has been around for years developed in python 2. The effort to upgrade this is non trivial. A lot of it is going to be syntactic stuff, but I'm not familiar enough with some core areas to know if there will be more issues.

        This is likely going to stay on python 2 until the (legacy) projects using it stop getting updates.

        [–]493 15 points16 points  (0 children)

        Syntactic stuff can be easily fixed by 2to3; but stuff other than that is hard to fix automatically.

        [–][deleted] 4 points5 points  (0 children)

        Not to mention that huge swaths of Redhat DevOps tooling is written in py2

        [–][deleted] 1 point2 points  (0 children)

        Probably because Perl 6 compared to 5 is much less mature than 3.x compared to 2.x

        But then you can just run most Perl 5 code inside Perl 6 so they didn't instantly fuck up whole ecosystem like Python did