5 ms·
> Awk has it's uses. If you use the command line you'll probably use Awk occasionally. Agreed -- I use awk all the time in shell pipeline. > I don't get the P
by __sr__ 8y ago
> Awk has it's uses. If you use the command line you'll probably use Awk occasionally.
Agreed -- I use awk all the time in shell pipeline.
> I don't get the Perl hate.
The problem is not with writing Perl -- I don't mind using Perl to write scripts and tools. In fact, I like it better than Python for writing glue code.
Reading Perl code -- especially if the code base is old and has been worked upon by multiple people -- now that is a real pain. Don't get me wrong, I have seen some really well written Perl code and have had the good fortune of working with some really smart Perl programmers. But the majority of Perl code I have encountered has been unreadable mess that makes me want to pull my hair out. There are times when I feel it is more productive to rewrite the code in Python than to spend time on the existing code.
> If you follow clean code principles Perl is fine.
Agreed -- except most Perl coders don't. Worse, they make a large chunk of people who contributed to CPAN -- something which was one of the major reasons behind the popularity of Perl.
> Use the tool that fits the job. I have no loyalties to any programming language.
Couldn't agree more.
- Koshkin 8y agoYes, Perl is widely known as a write-only programming language.
- Annatar 8y agoCorrect, because good luck trying to figure out what the hell someone else's Perl program is doing later. I used to spend up to 40 hours in a Perl debugger trying to figure out what the program is doing, and after going 25 layers deep into the call stack, I'd come out one week later none the wiser as to what that damn spaghetti code was doing. Tracking down any bug would always turn into debugging of epic proportions. I never had such problems debugging machine code! That is why Perl gets so much hate. My favorite construct to hate was going through the logic and just as I was about finished trying to understand the state machine at that point hitting an unless{} clause which instantaneously wipes the slate clean. Oh how I hate Perl.
- zzzcpan 8y agoAnd yet most Perl code was never hard to read and understand, except for stuff like OOP, but OOP is hard in any language. In fact push for OOP is probably one of the notable things that contributed to Perl's decline.
- Koshkin 8y ago> except for stuff like OOP That is funny, because one of objectives of OOP was to give code a better structure and therefore make it easier to understand.