8 ms·
As an outsider who hasn't written perl code in more than a decade this all makes a lot of sense to me. I think of Perl 5 as something "outdated" because I know
by DangerousPie 7y ago
As an outsider who hasn't written perl code in more than a decade this all makes a lot of sense to me.
I think of Perl 5 as something "outdated" because I know that there is a language called Perl 6. When I think of Perl 6 I am not particularly interested in it because I assume it's more or less the same as the "old" Perl, which I don't use and didn't really like back in the day.
Renaming Perl 6 to something else would help with both of these problems.
That said, I wonder how much damage has already been done at this point and whether renaming it now will still be very useful. There are a lot of references to Perl 6 out there already, so convincing people that Perl 5 is the latest version of Perl again will be tough.
- mkozlows 7y agoThere's no saving Perl 5; it's a legacy language in legacy maintenance mode for good reason. Renaming Raku/Camelia could help that language quit being saddled with the perception that it's also legacy in the same way, though.
- roryrjb 7y agoWhat good reason is that?
- mannykannot 7y agoI still use Perl 5 for some tasks, but my rule-of-thumb is that if I anticipate wanting to use references, I will go elsewhere.
- jerf 7y agoI suggest and use the opposite rule of thumb, "always use references". It tends to simplify things. Python writes the same rule into the language itself.
- mannykannot 7y agoWhen I used it for larger tasks, I did the same. Nowadays, the consequence of my rule is that Perl 5 sits in my toolbox between Awk and Python.
- ether_at_cpan 7y ago> but my rule-of-thumb is that if I anticipate wanting to use references, I will go elsewhere Why? References are not scary and they work just like in any other language -- they are simply a memory address that points to another value stored somewhere else.
- mannykannot 7y agoThe implementation is not the issue; it is the awkward and fussy syntax. It is not a show-stopper -- I coped with it for a while -- but there are better alternatives.
- kbenson 7y agoThe happy-path syntax is pretty straightforward. I wonder if you're under the impression like some that you need to use the arrow syntax or prefixing dollar for every reference, and not just the first? That's not the case. e.g. my @a = ( { first=>1, second=>"b", another_ref=>["y"] }, { first=>1, second=>"b", another_ref=>["z"] }, ); say $a[0]{first}; # Outputs 1 say $a[1]{another_ref}[0]; # Outputs z my $a2 = \@a; # top level is a reference too now say $a2->[1]{another_ref}[0]; # Outputs 1, arrow only needed at top level # The following are alternate syntax that I find unnecessary and better left alone (and most do) say $a2->[1]->{another_ref}->[0]; # Outputs 1, explicit, entirely unneeded because it's unambiguous without extra arrows say $$a2[1]{another_ref}[0]; # Outputs 1, extra prefixing $ dereferences first level ref Personally, I'm happy with a single arrow that lets me know if I have a reference or not. References are important, because they denote that this data may be accessed elsewhere as well, so I'm happy to have a small reminder. Inner level references needing a bit of care if they are copied is somewhat normal though, most non-toy languages have some concept of deep or shallow copying.
- mannykannot 7y agoI rest my case (it is a personal preference, anyway.)
- mkozlows 7y agoOff the top of my head: 1. CPAN was great 20 years ago, but it's a joke compared to modern dependency management systems. 2. Functions don't have explicit parameters, and still shift off of @_. (This can be kind of a catch-all for all the "things that are useful for scripts, but suck for programming in the large" design decisions in Perl 5, because I honestly don't remember all of them at this point.)
- jasonjayr 7y agoAs an active perl5 programmer, what do you mean by (1)? To this day, I've seen package management systems for many languages, and none I've seen has been as good as CPAN in terms of (1) Consistent place for distribution + documentation (cpan.org/metacpan.org) (2) Automated testing on a wide variety of platform and configuration (cpantesters.org) (3) CPAN has as standard for declaring dependencies in packages, but a newer "cpanfile" may be more akin go "modern" dependency management. Perl has also had a way of 'use Package $version' right in the source code for ages. (4) the command "cpanm Package::Name" (or even the older "cpan Package::Name") almost always results in figuring out whatever distribution needs to be installed, even if the distribution is named differently from the package name.
- ricardobeat 7y agoI don’t know where you’ve been looking, but none of that is particularly interesting or new at this point. I worked with Perl daily and find CPAN even more of a wasteland than NPM. The average package there hasn’t been updated in a decade and has ancient dependencies to match; takes months / years for clients to be written for new tech.
- wbl 7y agoI still use Awk, and when that gets bigger Perl comes in. Nothing wrong with it!
- thesuperbigfrog 7y agoThe current state of Perl 5 for Python fans: ---- Perl 5: I'm not dead! TIOBE: 'Ere! 'E says 'e's not dead! Internet: Yes he is. Perl 5: I'm not! TIOBE: 'E isn't? Internet: Well... he will be soon-- he's very ill... Perl 5: I'm getting better! Internet: No you're not, you'll be stone dead in a moment. TIOBE: I can't take 'im off like that! It's against regulations! Perl 5: I don't want to go off the chart.... Internet: Oh, don't be such a baby. TIOBE: I can't take 'im off.... Perl 5: I feel fine! Internet: Well, do us a favor... TIOBE: I can't! Internet: Can you hang around a couple of minutes? He won't be long... TIOBE: No, gotta get to Reddit, they lost nine today. Internet: Well, when's your next round? TIOBE: Next year. Perl 5: I think I'll go for a walk.... Internet: You're not fooling anyone, you know-- (to TIOBE) Look, isn't there something you can do...? Perl 5: I feel happy! I feel happy! ---- But seriously, Perl 5.30 just came out in May. It's not dead yet.
- nindalf 7y agoTIOBE is not a relevant barometer, it's just the number of searches and hence a noisy metric. Look at https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/. It indicates that the popularity of C and Java halved between 2016 and 2018 and then made a dramatic recovery, doubling in less than a year. It would be absurd to suggest that there was a real world change to the usage/popularity of these two languages corresponding to this. A better metric is the activity on stackoverflow and github, which is what RedMonk use. That's much more stable. Java and C have both been #2 and #9 since 2015. https://redmonk.com/rstephens/files/2019/03/toptwenty-2019-01.png https://redmonk.com/rstephens/files/2019/03/toptwenty-2019-0...
- penagwin 7y agoEven then I'm surprised to see Lua fall off the table, and Go's stagnation seems kinda odd. Given how much lua is used as an embedded language in Games, Databases, Servers, etc. I feel I've only seen it's usage increase. Go I can see as "appearing more popular then it is due to HN" but even then I feel like clis/networking tools have been using Go more and more.
- goto11 7y agoIf Perl 6 is renamed, Perl 5 could skip to Perl 7 in the next version to avoid confusion.
- DougBTX 7y agoLike PHP
- sswezey 7y agoFrom what I gathered, I believe that Perl 5 would transition to the minor version number much like how Java did (1.7 -> 7).
- buu700 7y agoThat feels like the best way to save the brand. Cut a Perl 7 release concurrently with the Raku v1 release, and just get on a regular schedule of incrementing the version every 6 or 12 months. Edit: Okay, starting from the minor version instead of 7 sounds like an even better approach. Not exactly the same situation, but this reminds me of Angular. Angular 2 was a marketing debacle; the official stance of "Angular != AngularJS" is stubborn and nonsensical — any idiot can see that they're confusingly similar, and if they're supposed to be different then why is the first Angular release version 2.0.0 instead of 1.0.0? (I personally think they should've called it Circular.) In any case, I think the way they moved forward (with "Angular 2" no longer being a thing, except in reference to that specific release) was ultimately the best way to salvage the situation; given its recovery and growth since then I'd say Perl could take some lessons from it.
- wott 7y agoYes for Perl 5->7, but it would be good to have a solid-ish feature change or addition to justify the jump and promote it. When I see that we still don't have a simple "is item 'in' set" operator, 12 (?) years after the introduction of smartmatch and 5 or 6 years after its half-retraction... (Well, we still have no sets either :-), let's talk about lists/arrays...) When I see we still don't have a clean function parameters declaration system (better than the mess with prototypes and signatures)... When I see that constants, enums, simple structured data (C-like-ish structs) still have to be simulated with functions and/or objects and the weight which comes together... ...On one hand, it gives a set of features that could be used to justify a jump. On the other hand, if these basic features has never been deemed useful by the language leaders until now (that is, during a couple of decades), I have little hope they will change their minds.