10 ms·
I don’t understand why Perl 5 and 6 are still tied together as if they are the same language. There’s no compatibility between the two. You can’t write a librar
by joosters 9y ago
I don’t understand why Perl 5 and 6 are still tied together as if they are the same language. There’s no compatibility between the two. You can’t write a library that works in both versions, so you lose CPAN and the thousands of packages that make Perl so powerful. I don’t think there’s even any reliable way to translate Perl 5 source code.
This is a vastly larger change than python 2->3, and people are still using python 2.x. In short, there’s no sensible upgrade path, Perl 5 & 6 are very much their own language.
If Perl 6 wanted backwards compatibility, they needed to have thought about it a long time ago. Trying to hack in some Perl 5 style functions into it now seems futile...
- ionforce 9y agoShould have chosen a different name for the language.
- yesbut 9y agoI feel that there should probably be a name change, but ultimately I don't really care. I am enjoying the language and they can call it whatever they want. If and when they change the name I will just refer to it as the new name.
- petre 9y agoThere were numerous discussions about this and it was decided against it. Eventually one would use Perl 5 from inside Perl 6 with the "use v5" statement.
- vgy7ujm 9y agoIf this really had worked seamlessly it would be great. But that includes /usr/bin/perl working this way on every OS etc... with a clear&easy upgrade path for existing code.
- petre 9y agoWell Perl 5 needs a spec in order to be supported inside Perl 5. Otherwise which version do you support? 5.6? 5.10.1? 5.16?
- cthor 9y agoClarification: Decided by the Perl 6 devs who want to keep the name and don't seem to care about the damage that decision does to Perl 5
- petre 9y agoOne of the discussion was on the Perl blogs[1]. Most of the devs there are Perl 5 devs and they also decided against the name change. Perl 6 is the next iteration of Perl that has been redesigned from the ground up. Why should it bare a different name? Yes, the redesign took more than a decade and it's incompatible with Perl 5, but so is Python 3.6 compared to 2.7, albeit to a lesser extent. Even Perl 5.26 has changed a lot since 5.6. In fact the least common denominator is 5.10.1. Using older versions is discouraged since they're largely unsupported by the majority of CPAN modules. 1. http://blogs.perl.org http://blogs.perl.org
- cthor 9y agoThe most recent discussion I saw on this subject[1] makes it very clear that there isn't a consensus. If there is, it's in the "Perl 6 should rename" direction. [1]: https://www.reddit.com/r/perl/comments/7r1b33/an_open_letter_to_the_perl_community/ https://www.reddit.com/r/perl/comments/7r1b33/an_open_letter...
- vorg 9y ago> Yes, the redesign took more than a decade Quite true! In fact, the redesign took more than a decade and a half (July 2000 to Dec 2015). A record worth breaking!
- virtualsue 9y agoIt was a decision made by Larry Wall alone.Since it’s his language, he’s allowed to do that.
- corpMaverick 9y agoA new name would have kept momentum in Perl 5 and it would have made Perl 6 more sexy. It is sad, Perl is amazing, I still use it as my personal scripting language. Back in the day I wrote complete enterprise applications.
- sampo 9y ago> Should have chosen a different name for the language. I wonder if Fortran 2008 wasn't called Fortran, could it be sold to computer science people as a "fast, type-checked matlab".
- emmelaich 9y agoWhat ... like Ruby? :-) Perl6 has some compatibility -- at the wetware level. Which is not nothing.
- zura 9y agoYou can actually use Perl 5 and even Python modules from Perl 6: https://github.com/niner https://github.com/niner
- joosters 9y agoThere are gotchas and unsupported functionality (e.g. 'since Perl 6 does not have the same concept of "context", Perl 5 methods are always called in list context.') which effectively mean that you've got no idea if library 'foo' will work or not without a thorough review of the code. At best, it's a hack. Impressive, sure, but not something that you could rely upon. There's still no sane upgrade path here.
- lizmat 9y ago> At best, it's a hack. Impressive, sure, but not something that you could rely upon. The same could be said for XS. And I do think that all of Perl 5 is relying upon that. > There's still no sane upgrade path here. FWIW, my blog post https://www.perl.com/article/an-open-letter-to-the-perl-community/ https://www.perl.com/article/an-open-letter-to-the-perl-comm... touches on that subject.
- jerf 9y agoXS is the "same" hack all the time, though. A Perl library that can only be called in list context in Perl 6 is a substantial change from Perl 5. I've seen much smaller changes trash code bases before. I've got real code that would be affected by that. (I also think the context idea was a misfire in Perl <6, but as long as it is there, I've sometimes written code that had to deal with it.) That said, why is it impossible to call a Perl 5 function in scalar context? Shouldn't the equivalent of Perl 5's "scalar" be fairly easy to implement? It may stink to have to manually use it, but it wouldn't be very often, and it's easy enough to use any of half-a-dozen Perl 6 features to minimize the syntactic hit.
- raiph 9y ago> why is it impossible to call a Perl 5 function in scalar context? Has Stefan (who wrote IP5) said or written that it's impossible? 18 months ago he wrote "So far I've found 3 different ways to implement scalar/list context for method/function calls".[1] He has left issue #31 open.[2] Where did you read that it's impossible? [1] https://irclog.perlgeek.de/perl6/2016-08-03#i_12961486 https://irclog.perlgeek.de/perl6/2016-08-03#i_12961486 [2] https://github.com/niner/Inline-Perl5/issues/31 https://github.com/niner/Inline-Perl5/issues/31
- simias 9y agoPretty much. I used to use Perl 5 a lot but I never considered using Perl 6 and eventually moved on from the Perl ecosystem altogether. The huge advantage of Perl ~10 years ago was the massive amount of CPAN packages but in the meantime python & friends mostly caught up in my experience. Meanwhile the shiny new revolutionary Perl 6 took forever to release and when it finally did nobody cared anymore. Quoting Wikipedia: >The design process for Perl 6 began in 2000. [...] on December 25, 2015, the first stable version of the specification was announced. I can respect taking the time to do things right but when your development history resembles that of Duke Nukem Forever something is off. That in my opinion hurt Perl more than anything else, even more so than the lack of compatibility between Perl 5 and Perl 6. If Perl 6 had released in early-to-mid 2000 I think there would've been enough interest out there to bridge the gap. It would've been messy but it could've worked. Instead Perl 5 felt a bit like a legacy language "while we wait for Perl 6 to be finished" and Perl 6 was nowhere to be found. And Perl went from the de-facto scripting language for un*x to people asking "Is Rakudo Perl 6 used in production?".
- joosters 9y agoI agree, it definitely hurt mainline Perl development when Perl 6 was this promised great new thing. At least Perl 5 never got abandoned, and there is development and bugfixing still going on today. Perl 5 has a feeling of being 'complete' as a language. I guess this makes it unsexy and it'll never be the cutting edge where all the cool devs want to work, but it's rock solid stable and reliable. Now, if only Perl 5 could get a JIT compiler...
- toyg 9y ago> I guess this makes it unsexy Nah, what makes it unsexy is the Perl syntax. The world has moved on. The readability of modern languages like Python is on another level.
- vgy7ujm 9y agoI disagree. To me Perl is more readable than Python. What is so modern about Python? It was released in 1991.
- jbucaran 9y agoYeah, but I think it's because they have the same name, only the number on the right is different and people tend to assume that Perl 6 is the one after 5.
- alien_at_work 9y ago>I don’t understand why Perl 5 and 6 are still tied together as if they are the same language. A lot of people seem to have forgotten, or maybe they weren't around for it, but when Larry anounced Perl 6 it wasn't for a totally different language. It was the next version of Perl. Just as Perl 5 was to Perl 4, and 4 was to 3 and so on. This idea that it's a completely different language and has no relation with 5 is something people started saying when it was clear that Perl 6 wasn't just around the corner.
- dkarl 9y agoAlmost. Perl 6 was always meant to be a step beyond Perl 5 rather than just an extension or evolution, but initially, Perl 5 was supposed to be a supported syntax. It would be one of many supported by the runtime, and the primary syntax people meant when they said "Perl 6" was going to be a clean break from the past — which excited many people such as myself who despised Perl 5 while envying its terseness — but the underlying engine was supposed to support Perl 5 with seamless interop from Perl 6. When they gave that up, they needed to work out a completely new plan for maintaining interest and driving adoption, but instead of reassessing they seem to have decided "who cares, it's gonna be so awesome that it won't matter." It might work, but I'm not holding my breath.
- raiph 9y ago> when Larry anounced Perl 6 ... ... he very clearly emphasized that it was NOT just the next version of Perl, in contrast with his approach with earlier Perls. > This idea that it's a completely different language and has no relation with 5 is something people started saying when it was clear that Perl 6 wasn't just around the corner. I think it's just a chinese whispers effect. To folk who paid attention to what Larry said on day one, it was obvious that P5 and P6 were (are) not the same and are not totally different either and are related. Around a decade ago some folk began repeating the mantra that P5 and P6 were different languages in the same family. The hope was that this would help. But some folk don't like nuance so they arrived at clearly made up and extreme views like "completely different language ... no relation with 5".
- unixhero 9y agoIt's the spiritual successor
- raiph 9y ago> Perl 5 and 6 are still tied together as if they are the same language P5 and P6 have been explicitly different languages since day one[1]. As Larry Wall said, "We had to make almost everything [in Perl 5] ... backward compatible [with previous Perls] ... But now it’s the first chance to [break bug-for-bug syntactic and semantic compatibility] and ... I think we should [take the chance]." > There’s no compatibility between the two. None? With an appropriately compiled perl 5 binary installed one can install regular Perl 5 modules from CPAN and use them as if they were Perl 6 modules: use Some:Perl5::Module:from<Perl5> ; How is this not compatible? > You can’t write a library that works in both versions Even the large complex Perl 5 package Catalyst works in both Perl 5 and Perl 6 per the above. > so you lose CPAN and the thousands of packages that make Perl so powerful Per the above, the majority of CPAN just works 100% correctly out of the box. > If Perl 6 wanted backwards compatibility, they needed to have thought about it a long time ago. P6ers thought about backward compatibility with Perl 5 from day one[1]. [1] https://www.perl.com/pub/2000/10/23/soto2000.html/ https://www.perl.com/pub/2000/10/23/soto2000.html/
- makecheck 9y agoAlso, how would similar functions even be enough? The average Perl script I had was full of special operators, etc. (they all changed and are impossible to Google anyway). And code bases have more than enough churn without being fundamentally rewritten multiple times to do the same thing.