4 ms·
Yes, but... Perl's greatest criticism is that it's friggin' unreadable, especially when written by less-than-stellar coders. It's my impression from a skim of
by eliben 11y ago
Yes, but...
Perl's greatest criticism is that it's friggin' unreadable, especially when written by less-than-stellar coders. It's my impression from a skim of Perl 6 that due to a bunch of fairly intricate features added there, it will be come even less readable than Perl 5. Is that a mistaken assessment?
- esaym 11y agoI used to have trouble reading the Perl5 code I would write a few weeks later. But these were small scripts I'd write and a month or two would go by before I'd right another one. The issue was I didn't fully know the language. Having spent a few years in Perl 5 now, I no longer have this issue. But the Ruby 1.8 code I wrote 5 years ago I can no longer read, I seem to have forgotten it. I never have been able to read Python, I don't know it either (though I do from time to time dig through their std lib and port some stuff into my modules I author :). The point is, you can't read a language that you don't know, this is such an old argument. And saying "you can read a language if you don't know it if it is easy enough/designed right", is just well... just keep me away from those languages... Reminds me of a 70 year old retired EE friend of mine. He still buys only chips that come with Basic onboard stating "its so simple, I could never learn any of this new languages", yet what takes him a page of basic, I can do in one line in any modern one... The point is simplicity is just one trait out of many, you can't hang everything on it.
- collyw 11y agoI have seen some bloody awful python code. (Though the worst was still Perl when a bioinformaticain colleague wouldn't even indent it properly.)
- bloblaw 11y agoUse Perltidy to automatically re-format and indent any "ugly" looking Perl! https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy
- xorcist 11y agoI believe it is a reputation from the time when the web coders first scripts tended to be in Perl, because that was what was available server side. They have long since migrated to PHP instead, and Perl written by programmers who learn the language aren't better or worse than anything else.
- VLM 11y agoIts generational. The first generation of the web was its short simple text, and it has URL links. You need a language for short simple text reports. In the 90s, that was Perl, it probably still is today. Several generations of the web have happened since then, the graphics art generation came and went (the web should be programmed entirely in WYSIWYG frontpage or the web should be nothing but downloaded adobe flash animations) and now we're into the program generation (the web should be cascading classes and object oriented frameworks and infinitely complicated architectures) I think you can wedge a simple text reporting language into the later generations but its going to be more difficult than using that language to generate simple text reports that happen to have some html entities sprinkled in. MOOSE is a pretty awesome OO system for perl, and Mojolicious is pretty good, but its not realistic to dethrone RoR or javascript frameworks with Perl. Perl6 could be positioned for the next generation of the web, whatever that ends up being, after the programming generation.
- derplederple 11y agoIf you are using Perl code golf jokes as your basis for imagining what Perl code looks like, then this is incorrect. Yes there are a few annoyances with special variables and yes this makes it very easy to write things that will be hard for other people to read, but I really think people that write things like that are doing it on purpose. The documentation for the various intricacies of Perl 6 has gotten much better, at least IMO from Perl 5, and most of the more interesting aspects of the language are just slightly augmented existing ones.
- bloblaw 11y agoWhen I encounter another's Perl code, I run 2 things, (1) Perltidy to reformat the code, and (2) Perl::Critic to identify poor coding practices or insecure code. https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy http://search.cpan.org/~thaljef/Perl-Critic-1.125/lib/Perl/Critic.pm http://search.cpan.org/~thaljef/Perl-Critic-1.125/lib/Perl/C... If you have trouble reading Perl, run those 2 programs and you'll greatly improve its readability.