|
|
|
|
|
by jinpa_zangpo
1110 days ago
|
|
The sweet spot for Perl is any problem combining text processing with Unix system calls. It's a system administrator's idea of what a programming language should be. I feel the reason why Perl got a reputation as a "write only" language is because it's easy to write a simple Perl script, so people with no programming background wrote a lot of ugly code. It's simple to write clean, maintainable code in Perl with a little discipline. |
|
You can write clean, maintainable code in Perl, but the language simply isn't designed for that, it has other priorities. The whole "there is more than one way to do it" thing is obviously not how you get consistent code, first class regexes which are one of the biggest strengths of Perl are notoriously hard to read, and the "ugly" options tend to be the easiest to use. It is all great for getting stuff done quickly and efficiently, not so much for maintainable code.
Languages that favor readability will typically try to go towards the "one true way" of doing things, use more descriptive words in standard libraries, have an annoying "bondage and discipline" compiler, etc... Perl has little discipline built-in, so it has to come from the programmer, don't expect it to guide you to the cleanest way, but you can expect it to help you write everything in one line.