Hacker News new | ask | show | jobs
by ojosilva 2513 days ago
I think Perl was fighting on too many fronts at the turn of the century: web, systems automation, data processing, science and a few more. Today these areas are better covered by other languages that have hefty internet buzz and corporate support behind.

Perl also has no shiny features. It's just extremely dynamic and paradigm agnostic, great at shell interactions and natural at text processing (specially with regexes), good enough at binding C/C++ libraries, has package management built-in (CPAN) and an automated testing culture. Perl basically set the baseline for a lot of today's languages.

Perl5 devs put a lot of focus on making Perl even more dynamic during the 2000s, relying on CPAN/community to fix language quirks and plug in novelties. It worked to some extent, Perl got to the point where it could be written like Haskell, Ruby... During that time it also got a powerful but optional class system (Moose) and reinvented itself as a web language (Mojolicious, Plack).

Unfortunately it all came too late, most Perl5 devs moved to something else or maintained Perl5 code frozen in legacy mode. Fewer and fewer started new projects using Perl. For instance, nowadays I tend to pick a language/ecosystem pair based on these concerns first depending on what the job requires:

- asynchronous event processing, specially network related -- I pick JavaScript/Node.

- real parallel processing and highly performant systems, I'd use Go.

- "we got a package for that" -- Python or JS at the forefront here. It depends on what package I'll need for the job, typically it's not going to be in CPAN.

- great code reuse/portability -- to me JS wins here. And still the only single language for both server and browser.

- compiled hard-packaged binaries: Go, but also Rust, Elixir, Nim, and others can fit the bill.

- code style and paradigm -- a very personal choice, I think Typescript and ES2019 are both great here. Golang and others are also great if I feel like staying away away from OO.

Perl would have a hard time competing in any of these fronts, but it still is one of the greatest for practical extraction and reporting, text or database wise and easily available or pre-installed on many servers out there new and old.

1 comments

> web, systems automation, data processing, science and a few more.

doesn't this apply to python, although now there are additional competitors?

> reinvented itself as a web language (Mojolicious, Plack).

highly opinionated and potentially flame creating , but -

perl was the original web language in the CGI era, PHP pretty much dethroned it due to simplicity of server integration, rails knocked them both out of 'leading edge', then the Node/SPA era arrived.

mojolicious / plack are pretty much things to bring perl up to date w/r/t the 'rails' type

I've long thought if they had PHP-style inline HTML/Perl templates it would've given the language some legs. I'm pretty sure it exists (since I remember using it back in the day as a toy, just like JSP and other stacks), but it either came too late or didn't take off before PHP stole the throne.

I love Perl but I'm currently looking at around a decade of experience which is really hard to take into a new role. I'm working a bit on Wordpress now but PHP is basically close enough to Perl for me that it sits in a weird uncanny valley where I get things just wrong enough to cause headaches every time.