DEV Community

Cover image for Should Perl die gracefully?

Should Perl die gracefully?

Mark Gardner on June 01, 2021

A comment on the Medium version of last week’s article got to me: I wish they’d just leave Perl static. Then we wouldn’t have to waste money rete...
Collapse
 
thibaultduponchelle profile image
Tib

Your last sentence sounds a bit harsh 😃

His comment sounds like a non-sense to me, how could you blame Perl for compatibility? Especially compared to almost all other programming languages.

Perl is impressive by how stable and backward compatible it is. You can find a more than 10 years old perl script (even a bad one) and it will probably run without any problem on a perl interpreter installed on your system (whatever its version). At worst you would have a very small edit but nothing painful.

All the optional features sets introduced by the core team are not damaging this.

We even have some partial forward compatibility where some features can be retrofitted to old version of perl via modules. For instance, try/catch is added to perl 5.34.0 and is available for previous perl thanks to Feature::Compat::Try module.

This is mad 😀

Collapse
 
mjgardner profile image
Mark Gardner

Sorry, I get a bit impassioned when my livelihood is besmirched.

Collapse
 
tja1980 profile image
Tristan Addie

Id be amazed if a perl application had time to mature to legacy status in this day an age, with code reuse policies, rewrites/refreshes as part of contracts being renegotiated, perlbrew, peer review, change controls there's just so much control in change management it's hard for things to be missed if they break with new or old features.

Collapse
 
raigaurav profile image
Gaurav Rai • Edited

The person who complained about compatibility in Perl has no idea what he is talking about. Its ironic that the language mentioned by that guy in Medium article breaks the compatibility even in the minor versions. 😁

However there is a good question which comes out of it. How much backward compatibility matter ? I know Perl has put a lot of focus on backward compatibility. But the rise and popularity of Python prove that backward compatibility is not a big deal. 😬
Even though version 2 and 3 are quite different and they break the compatibility within minor version also, people doesn't jump the ship and migrate to other languages. They just migrated from 2 to 3 or will be migrating in future( or maybe not).

Perl feature guard are awesome thing ☺️. But I am yet to find a production code in corporate environment using that. I found that people are not in habit of using it(or unware of it).

Collapse
 
tanami profile image
Tanami

someone sent this to me but they had gleaned the opposite meaning of the post, lol (I guess they didn't actually read it)

Collapse
 
mjgardner profile image
Mark Gardner

People only read headlines on the Internet? Shocking.

Collapse
 
tanami profile image
Tanami

well what I mean is that people are probably not reading this article and taking it as "oh, Perl is dying"