Better HN
topnewbestaskshowjobs
Log inSign up

brtastic

17 karma · joined Oct 21, 2021 (5y ago) · 5 submissions

Submissions

comment 1y ago · link · parent

Yes. Perl will give you incredible power and you will have a lot of fun in the process.

First and foremost, it is great for writing scripts. It is much more civilized and faster than bash. If your script does anything more than calling a couple programs, writing it in Perl is a good idea. It has almost instant startup time, unless you use some heavy modules.

Secondly, its one-liners are very capable and can efficiently solve problems you would normally solve by a mixture of bash, sed and awk. Once you learn regexes it can mung text more efficiently than any other tool.

Lastly, if you wish so, it can scale up so that you can write full-blown applications in it. It is good for all kinds of backend tasks with the help of CPAN modules. As a bonus, any application you write should last you for a very long time, since both the interpreter developers and the community in general take preserving backward compatibility seriously.

Please note that a bit older technologies like Perl don't generate as much noise to get excited about. There is no new language feature, library or framework announced every month. Instead you can start investing early into your future by writing personal programs in it that will likely last you a lifetime and will not require constant tweaking as the ecosystem changes. Perl interpreter is not a "moving target", and many established CPAN libraries aren't either. It's a solid platform to develop stable, useful software.

comment 1y ago · link · parent

If it allows you to be productive and fits the way you think, why not use it? And what is your metric for "being better"?

comment 1y ago · link · parent

I'm not old, I know other things. Still, I use Perl.

comment 5y ago · link · parent

The tool analogy is flawed. Languages that move fast and break backward compatibility are tools, but organic. If you leave them in your toolbox for too long they start to rot.

This does not apply to those languages that do not get updated (bash?) and that does not break backwards compatibility (perl? but without CPAN modules). I know that my PHP tool has rotted even though I was actively using it. It moves too fast and the frameworks I was using are no longer any popular - should've learned symfony instead of yii, now laravel is taking over

comment 5y ago · link · parent

You can, but you don't have to. With some self discipline, Perl can be very readable. The only problem is that actually requires skill and agreement in development team. Perl Best Practices helps with that.