5 ms·
I was just implying that Perl was jokingly called a "write once" language. It certiainly was for me. Remember starting a bionformatics project with it, and aft
by rdtsc 11y ago
I was just implying that Perl was jokingly called a "write once" language. It certiainly was for me. Remember starting a bionformatics project with it, and after a few months, I could not read my own code. This just reminded me of that.
- kbenson 11y agoThere are definitely those times when that happens, but I find it's mostly when the code has grown without a plan, and that it's mostly a problem for every language. That said, Perl (5 or 6) can easily get you in trouble if you aren't disciplined and decide to take your one liner and make a program out of it without taking a bit of time to convert it into a more readable form. I'm still undecided on whether Perl 6 takes the TIMTOWTDI motto too far. There seem to be multiple purely cosmetic ways to do something (sigil-less variables), and that's less of a "more tha none way to do it" thing and more of a "more than one way to make it look" thing (colon method call syntax), and I'm not sure how that will work in practice. Then again, there are lots of things that I think are unequivocally much better, such as method signatures (which you can approximate in Perl 5 with Kavorka[1]) and OOP (which Moops[2] in Perl 5 seems to do a good job of bundling the various Moose family modules together for, with Kavorka). 1: https://metacpan.org/pod/Kavorka https://metacpan.org/pod/Kavorka 2: https://metacpan.org/pod/Moops https://metacpan.org/pod/Moops
- fibo 11y ago"Perl gives you enough rope to you .." cit. Larry Wall. It is cause Perl is very expressive. I usually write code even my boss can read, and looks trivial remember Perl is inspired on natural languuages. On the other hand you can write very cryptic code, in every language, but Perl can be very tricky: use comments for the future you. Learning Perl was a great excercise, after that I could learn JavaScript really easy not only cause they are so similar but cause Perl and its culture teaches you about programming. It is a milestone.
- Montezuma123 11y agoI will say that I started using Perl5 recently (big python fan). I expected everything to be crusty and bad. CPAN worked great, and the doc...my GOSH the doc is sooo good. It is everywhere. In my command-line, gazzillions of websites. I forgot what it was like to not be dependent on StackOverflow.
- collyw 11y agoPerl Monks is far better than Stack Overflow for Perl questions, as they actively encourage the discussion that Stack Overflow avoids, leading to a greater understanding afterwards as opposed to just something that works.
- Montezuma123 11y agoI can't count the # of times a super helpful question was closed on StackOverflow for being "off topic" or being likely to cause a flame war. I do like Perl Monks, but wish the format was a little different UI wise. Def still usable though.
- txutxu 11y agoI work with legacy third party perl code every day. It's very rare if I need to check the docs reading the code. Very exceptional, no issue. If you cannot read your own code, maybe the issue was your level at the time? no offense intended.
- labster 11y agoIs not being able to read code from six months ago just a Perl thing?
- ionforce 11y agoIt's an every language thing, but it is magnified with code typically produced by people who write in Perl.
- collyw 11y agoI have inherited code from bioinformaticians with the same problem, except that it was written in Python.
- jqm 11y agoAll languages no doubt have that problem. But I firmly believe some have it worse than others and Perl is at the top of that list in my opinion.
- chris_wot 11y agoHow is that different from C or any other code? Every programmer has had the "what the fuck did I write?" moment at least once in their career...