Hacker News new | ask | show | jobs
by gkya 2800 days ago
Perl 5 is a great language and does not deserve any of the hate it gets. Unfortunately the dev community is always on the look for bandwagons to jump into. It's a well thought out language with a comprehensive list of features nicely integrated together, a vast ecosystem of packages, very good documentation (has the best offline docs among all of the popular languages out there, after C stdlib), and has stood the test of time.

Perl 6 is a nice experiment and may hold some ground in the future, but is not a practical tool or something in the same space as Perl 5 today. It's very unfortunate naming IMO.

2 comments

Perl 6 is as realistic an option as several other new languages. It is new(ish), and still has some performance issues compared to Perl 5 (though this is becoming less a thing, and there are now several areas where 6 is faster than 5), but it has had regular stable releases for nearly three years. You can deploy it today and expect the code to keep running in the future without major modifications.

I'm not using it in production, but I think one reasonably could. I suspect we'll be able to start shipping Perl 6 code in a couple of years (my company builds installable applications, and we don't want to maintain Perl 6 packages ourselves, so we need our target platforms to have good packages for Perl 6 available before we can ship it).

What does your company do to where they're chill with trying to ship p6? Just open-minded?
Who's "they"? I'm the founder of the company. It's small, we do what we want.
Ah sorry. I assumed a 500+ company with bloated and old-school IT like my own. I shouldn't have assumed that :).
I think in 10 more years it's going to be anazing. Amazing just takes time to get right.
It might be amazing (to some degree, it already is), but unfortunately I don't think I'll be using it for much. TIMTOWTDI is great, but like most things, too little or too much are both problematic. This wasn't always my point of view, I came to after many years of following Perl 6 development (from all the way back in the Parrot days). As the language implementations started maturing and people implementing things to show off (often for Advent calendars), I started realizing that I was having a really hard time following how each thing was implemented, because there were far too many ways it could be implemented, but in a fundamentally different way than Perl 5.

Perl 5 gives you a good set of primitives, a lot of flexibility, and then tasks you with using this mix of core types, context, and namespaces to do what you want, how you want. The actual things you need to know to reason about most code you encounter is fairly simple though, and if not immediately known to the average Perl programmer, they'll have a good idea to figure out what it is, and what the usual suspects are for really weird stuff (I'm looking at you, indirect object notation).

Perl 6 has so many core, fundamental things to know, that in any piece of code I might encounter, the number of things that could be in use is staggering. I've read the Perl 6 Synopses, end-to-end, years ago. I remember a lot of what's in there. Hell, I was really excited about those features when reading about them. When I saw them start to be put into practice, that's when it crystallized for me. Specifically, I started having real doubts when I saw Larry implement a solution for Rosetta code in Perl 6 using a sigilless[1] style. What's the point of these? Just to represent special characters, as in the example? But they're also constants, because they have no containers? And there's also defined constants, but those have sigils?[2]

Don't get me wrong. Perl 6 has some (a lot!) of good ideas. I mean, it sort of has to, since it actually has all the ideas. That's the problem. Not all ideas area good, and even if you only selectively implement all the good ideas, they aren't always still good when they are forced to coexist with each other.

At this point I see Perl 6 as a really interesting experiment to see how some of the more interesting ideas work in practice when used in a less opinionated language. I'll probably do some simple stuff in it eventually (I mean, I'm still fairly familiar with it just from following it for almost 15 years), but I don't have high hopes for using it for any professional projects, or for using it on a project with many other contributors. That's okay, I never stopped writing Perl 5, it's what I do for my day job, so I'm not missing it too much.

That said, I still have a very soft spot in my heart for Perl 6. It's an extremely quirky and wonderful language when viewed purely as a language and a thing to play with. That I think it won't ever see professional success is fine. There's lots of things in life that are great without that, and there's lots of types of success other than that to aim for. And that's totally okay.

1: https://docs.perl6.org/language/variables#Sigilless_variable...

2: https://docs.perl6.org/language/variables#The_constant_prefi...

I started using Perl again. It is a well-defined language with a good library system that's also been around long enough to have stabilized. The fact that it is so integrated into many system things help ensure that it remains stable. It's flexible, but you can still write readable code with it.

The only thing I couldn't find at first was a good editor for it. I would up with ... IntelliJ. The only minor thing that Community Edition doesn't have is editing CSS, and I can live without it. There's a Perl plugin that does good completion and navigation (Find Uses / Find Definition, semi-intelligent completion).

And that's what I am using now for prototyping.

I would highly recommend Sublime with ModernPerl syntax highlighting. You can also set up perlcritic and perltidy pretty easily.

It's not intellij, but it covers most bases.

I tried the IntelliJ plugin and unfortunately just couldn't make it work. Past a certain point of metaprogramming (e.g. using complicated-but-not-objectively-that-weird Moose constructions with multiple levels of subclassing and mixin-based inheritance), it just couldn't keep up and started providing autocomplete suggestions that were completely off-base.