157 points · by vgy7ujm · 8y ago · 232 comments
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...
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?".
What I've heard about Perl 6 does sound intriguing, and probably a solid language platform does take a good decade-plus to get on solid footing. But re-using the name of a once-well-loved and established language is a bad move for both the old and the new versions.
Larry said something similar on day one.
> and let the old project live out its own lifecycle.
Larry did exactly that. It's still living out its own lifecycle and will for another N decades.
> re-using the name of a once-well-loved and established language is a bad move for both the old and the new versions.
I agree that this has likely turned out to be the case for Perl 6.
As a Perl 5 developer, I look at it and go "If I have to learn a new language I might as well make it a popular one like Python 3 or Rust."
YMMV but for me this is what makes it easy to maintain: you just need to learn Python not the personal programming style of the previous developer.
Being "forced to use Python" sucks as a Perl developer.
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...
Perl 5 running as a slang on MoarVM or JVM would give it a JIT compiler
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.
Are you aware of the compatibility with Perl 5 that I mentioned in my prior comment in this thread? If so, why do you discount it?
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].
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.
... 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".
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.
At best, it's a hack. Impressive, sure, but not something that you could rely upon. There's still no sane upgrade path here.
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-comm... touches on that subject.
I wonder if Fortran 2008 wasn't called Fortran, could it be sold to computer science people as a "fast, type-checked matlab".
Eventually one would use Perl 5 from inside Perl 6 with the "use v5" statement.
Perl6 has some compatibility -- at the wetware level.
Which is not nothing.
Last year I sat down with Perl 6 for long enough to form opinions on the language's merits, which are many. I'm told many of my criticisms have been addressed in the five months since the article was published, but perhaps some of you will enjoy reading the original review. Cheers!
"current of frustration that Perl 6 isn’t more widely adopted. There’s a kind of righteous indignation that the language is very good — so dammit (I’m projecting), when will people start taking us seriously? "
despite not even being part of Perl 6 community in any way. So many are attacking it on such circumstantial, or even irrelevant, grounds instead of discussing the merits and failings of the language itself.
This is exactly the sort of thing that makes me frustrated (of tech world); people, myself included, scared to jump to new things, or even try out them leading to strong herd mentality. I suspect it is because everything has such strong network effects these days. And of course HN is kinda the worst because the business angle; there is always the question about if this makes commercial sense, which I'll admit might not be the strongest aspect of Perl6.
I have happy memories of Perl, and it started me on the path that led to a nice career of Python awesomeness. Thanks, Perl! That said, I can't imagine a plausible scenario where I'd ever consider using it again. I almost certainly wouldn't use it professionally because it's not exactly going to light up a resume. Yes, there are still Perl shops. But no, there aren't very many of them, and I'd be highly suspicious of an engineering department still writing new code in it today without a very good reason.
That's because any shop that needs to get job done quickly is a Perl shop. During my early career I even knew a architect who had sort of put a blanket ban on any Perl to be written. He was only stumped people were largely acting like pirates, were writing and running directories full of Perl code all the time.
Only a week back, I needed some stuff to be written. Talked to a Java guy, he tells me he can do it in a week. Told him to never mind. Went back to my desk and wrote in a afternoon in Perl. And we are a Java shop and write Java most of the time. But its just that Perl is unbeatable in getting things done.
And yeah Python. It doesn't even remotely hold a candle to Perl in terms of practicality and getting things done. Readability and all that, but frankly beyond that there is nothing in Python. Not even multiline lambdas, half baked, half implemented functional programming features. IO looks like somebody held a gun to the implementors head and he added it because he had to.
Some times I even find, sed and awk to be a million times more useful than Python.
Be careful with that wild generalization. I’ve seen lots more “get job done quickly” in Ruby than Perl (but neither as much as with Python recently). I have nothing bad to say about Perl, but it’s not really defensible to claim it’s used as commonly as other languages.
We also write a fair amount of Javascript on the frontend but moving the backend to Node.js doesn't add any benefits. It just makes things harder, having to track constantly moving targets, using many different tools to accomplish the same jobs, having to fork stuff just to get it to work properly.
― George Bernard Shaw
Not all great decisions are rational, follow your heart be happy
For me, Python is an uninspiring language, yet it inspired many people to build great things, a decision that to me, sound so .. irrational
Very few succeed, but those who do, make big changes
It is a high risk high reward type of decision
But honestly, Perl 6 is not that bad of bet, there while small, a lively community around it filled with brilliant developers
Also, how would you handle strings in this other language?
In P6 and its grammar engine, a string is a sequence of characters, where characters are defined as the thing a human thinks of as a character.
Almost all other languages have adopted either a byte or a Unicode codepoint as being equivalent to a character, both of which are really profound problems that are still not being confronted to this day.
For example, the draft docs for Python 3.7 don't even mention characters (by which I mean what a user thinks of as characters, not bytes or codepoints).[1]
[1] https://docs.python.org/3.7/search.html?q=grapheme&check_key...
I too would hesitate to use it in a commercial context, but only because its development stalled for 15 years, leaving us with almost no developers that still speak perl and still work in the trenches... perl's cost of adaption in comparison to other dynamic languages skyrocketed :(
The popularity argument only makes sense in regards to hiring new people, which is a fair point.
But yes, it is going to make hiring more challenging.
For example: I'm collecting some stats indexed by (small) ints. In Perl, I'd just say
$collection[$index] = $stat;
Try that in Python when $index is not received in order.Edit: Fixed typo; meant "$stat" and not "%stat"
dict[index] = stat
...works much the same. \%stat;https://trends.google.com/trends/explore?date=all&q=perl%20t...
- “We have lots of deployed code and don’t want to rewrite the whole thing.” That’s valid (although I still urge them to consider the hiring challenges down the road).
- “I’ve used Perl exclusively since I downloaded it over dialup and I’m not interested in those shiny new languages the kids like.” Run screaming.
When you say you wouldn't use Perl again, that's a fine personal choice, but has zero to do with the merits of the language or the people who use it.
That said, I can't find any reason to pick up Perl 6 and start learning it. With so many other useful and interesting languages out there: Python, Elixir, Elm, Rust, etc... what appeal should Perl 6 have to the masses these days?
Is anyone jumping into Perl 6 like they did with Ruby a decade ago and saying, "Wow, programming just got fun again"?
I'd love to see a Perl 6 breakthrough, but honestly it feels like those attempts to keep BeOS going... too little, too late. Its time has passed.
I'm not really understanding the lack of love for Perl 6 unless it's from folks that have invested careers in Perl 5 and are miffed by the compatibility story.
For example can someone point to the analog of this https://docs.perl6.org/language/grammars in Python, Ruby, Groovy etc?
Also, https://modules.perl6.org/ seems to be growing.
I think far more likely is the people that have decided to dislike "Perl" are letting their prejudice leak.
Perl 5 is one of those languages that is hides complexity, partially by accident. I'm sure a lot of people have looked at Perl and been unable to figure out what's going on, and why the same function returns different values sometimes when called with the same arguments[1], and not known what to make of it because many things work exactly as expected, especially for people familiar with C. This can be confusing to people that thought they were getting a handle on the language. The conclusion then is either they are failing to understand the language, or the language sucks. I imagine one choice is easier on the ego than the other.
1: Context. People skimp on the reading or targeted learning and context bites them in the ass, even if it's fairly simple once known.
Those language grammars, if they've been properly implemented, could be the Perl 6 killer feature if well promoted. It could even lead to a sudden fall in brogrammers using regexes to parse html.
Looking at the ranking of those languages you mentioned on Tiobe, i.e. Python (4.7%), Ruby (2.4%) and Apache Groovy (0.3%), I guess if Python 3 took the initiative and implemented them, that would work as well.
But everybody who's working on Perl 6 does it because they enjoy it, learn by doing it etc. Why should they declare it a failure? Usage numbers are slowly, slowly creeping up, and working with and on Perl 6 can be real fun.
If I'd work on it regardless on how much of my previous time I invested in it, why should I even consider sunk costs?
I don’t know if they should give up. Haven’t looked at Perl 6 in about 5 years. The best thing the community could do would be to turn the language into the solution to a particular problem:
Web development, machine learning, etc
Sure, anyone could build everything from scratch, but that’s usually not a good idea.
This kind of crazy has been identified in the ecosystem for a while.
Examples:
- Better migration/transition from Perl 5
- Performance and stability
- Killer features and explaining these thoroughly
- Best in class tooling, editor support, super easy deployment
I am sure there are efforts, but perhaps not enough to meet the demands?I say this of course realizing that resources in an open source project are limited. But something has to happen to accelerate the usage.
Keep on writing more articles etc to spread information outside the P6 core dev echo chamber.
Im just throwing out examples here:
- Official and optimized docker images
- Easy to build CI pipelines
- Fast and parallel execution of tests, easy to integrate in CI
- Quick compile times if any of language, libs etc. Fast downloads of binaries
- Great vendoring and packaging, don't need internet to deploy, deploy as binary
- Easy command line tools for enforcing linting, code standards etc. with well thought out defaults officially supported
- Editor support, out of the box experience"Lets move to Perl 6 since it will cut our infrastructure costs in half. It will also cut our time to market in half due to the fantastic tooling." Thats the kind of things business decision makers need to hear.
This is what the CPAN Butterfly Plan is all about. And after that the Butterfly Perl 5 Project.
For many Perl is tied to Unix and IMO a transition for /usr/bin/perl would be key.
I might not fully understand your plan but please do not throw away the "ubiquitous in Unix" legacy.
Do you realize people that speak more than two languages already use multiple keyboard layouts all of the time?
So are you suggesting that Perl should discard its TIMTOWDI philosophy? It won't be Perl anymore then, would it?
Did you mean to type a black square there, or is my Android phone missing a font? In any case, this shows a potential issue with using Unicode characters for operators or identifiers: unless it's from a common Unicode block (like basic Greek letters), it might not be readable. It's not just writing that can be a problem.
I am tempted by the idea of being able to type e.g. ½x² in mathematical code, but overall it sounds like much more trouble than it's worth.
Is it dynamically typed, optionally typed, statically typed?
> sub f(Int $x) { $x + 1 }
sub f (Int $x) { #`(Sub|140221097113944) ... }
> sub g(Str $x) { f($x) }
===SORRY!=== Error while compiling:
Calling f(Str) will never work with declared signature (Int $x)If the compiler can prove the outcome of a type check at compile time, it can throw a type error or optimize out the runtime check, depending on the outcome.
https://perl6advent.wordpress.com/2017/12/16/day-16-%F0%9F%8...
perl5 completes the task in <3s.
[1] https://bitbucket.org/ewanhiggs/csv-game/src/9604dc176b6303e...
It is essentially impossible to do so, as the problems are systemic and run extraordinarily deep.
Would you honestly consider any possibility of working on a "level" with people like this: https://www.nntp.perl.org/group/perl.perl5.porters/2018/01/m...
So I can't fault rurban for walking away. The project still has merit. Its current leadership - none.
The language was finally deemed sufficiently stable in 2015 to have its first proper release (the 'Christmas' version 6.c). We're still waiting for an implementation with adequate performance for generic usage. The problem is that a lot of the implementation happens at a high level, which necessitates a sufficiently smart optimizer.
As one of the primary maintainers of Mason for many years I enjoyed telling non-technical friends that they used my work every time they went to Amazon. But I'd kind of assumed that was no longer the case these days. Apparently I can keep telling them the same thing!
We won't be using perl 6, and suggesting it in the office would get some good laughs out of everyone who's had to work on that codebase.
I'll still write perl when I need a quick one-off script to solve the kind of problem it's good for, like throwing a bunch of regexes at a bunch of text files.
Its a bit like C. The language is so neatly integrated with the OS that its hard to beat it.
Not many languages feel so "Unixy" as Perl.
Sorry if that sounds harsh but in Python, Ruby, even Perl 5 large companies that bet the farm on the language are ten a penny
By that metric, COBOL is awesome.
The last time I touched perl professionally was in '09 during the perl winter. The web stack was moving in other directions - especially that of Java (I'm a corporate back end line of business keep the gears of the company turning type). I write boring code - which is good. Boring code doesn't surprise people and when I pull it up from 10 years ago, it still works. I try to avoid clever code now - it takes too long to get back into the mindset that I had when I wrote it. I'll admit to one bit of clever code with annotations on an enum that I've written in the past half decade... and that is in place to force what would be runtime errors to be compile time errors instead.
I looked at perl 6... there's even a bug report with my name on it ( https://github.com/rakudo/rakudo/commit/8d04bec ). I really want to like the language - it makes me think about some things differently... and here's the "but". But it all feels too clever. Code needs to be reasonable - something that I can come back to later and pick up again and continue on with minimal switching of the mind. Unicode operators, Junctions (as neat as they are), redefining operators... its letting me and encouraging me to write clever code.
I pull up the docs and see things from https://docs.perl6.org/language/operators that make me wonder if its gone too far. There's more than one way to do it... but there are more of them than Java 8's list ( https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.htm... ). I feel that there's more than one way is "more than one approach" not "more than one way to type '+'".
The code just doesn't feel reasonable anymore.
For what its worth, after not touching perl professional since '09, this past week I was called on to fix a LAMP stack. There's the CGI with a nice 'use CGI.pm' (the last change time on the file was from 2011). I was able to open it up, read it, debug it, and fix it in under an hour. It was straight forward, sensible, and reasonable code. I shutter to think what it will be like in another decade if someone comes by and asks someone to debug some 10 year old perl6 code and they open it up to find unicode scattered through it and trying to remember what =~= or ∘ does.
For my scripting needs now... I've been a Java coder for the past decade. When I want a script I'm more likely to fire up groovy. It runs, its stable, and it doesn't try to make me write clever code.
Sorry perl... you're just not my go to language for thought to code anymore.. and thinking in perl6 just isn't something that I'll find myself easily writing once or being able to figure out when coming back to later.