4 ms·
I'm always a bit puzzled by these claims of unreadable perl. Go find me perl I can't read: http://search.cpan.org/ http://search.cpan.org/ . Where is it?
by kingkongrevenge 17y ago
I'm always a bit puzzled by these claims of unreadable perl. Go find me perl I can't read: http://search.cpan.org/ http://search.cpan.org/ . Where is it?
- plinkplonk 17y ago"I'm always a bit puzzled by these claims of unreadable perl." unreadable for the claimants not for you. "Go find me perl I can't read .. Where is it?" Any language, no matter how obscure, will have some practitioners who can read any code written in it. I am sure someone can say this about APL "What do you mean APL is unreadable? I can read any APL code fragment". To repeat, they are saying they can't read it not that you can't. Don't take it personally. Use what works for you.
- staunch 17y agoIt's a totally bogus claim. The only people that can't read their own Perl after 6 months are the people that don't really know Perl. And by "know" I just mean they read and understood most of Programming Perl/Objected Oriented Perl. Anyone who has studied those two books can understand 99%+ of the code on the CPAN. A lot of people have made a few halfhearted attempts at using Perl and were so put off by the scary looking sigils that they gave up. Then they blame Perl to comfort themselves. It's not them that's too lazy to look past a new kind of syntax, it's the language's fault!
- plinkplonk 17y ago"The only people that can't read their own Perl after 6 months are the people that don't really know Perl." again replace "perl" with "APL" or "BrainFuck" (or any language with baroque syntax) and the above sentence is as (in)valid. This comes close to the "No True Scotsman" fallacy. If you really knew perl you would have no problems with reading it. Sure, but that applies to anything, no matter how convoluted. It doesn't matter whether you think their claims are "bogus" or not, or whether they meet your standards of "really" knowing perl. Some people find that they can read their own code in other languages easier than their own code in perl after 6 months. You might think this "bogus", that doesn't matter. For them, that is a reality they have to deal with. And many deal with it by shifting to other languages and leaving perl to its aficionados. This is as it should be. Everyone should use the language they like and not use languages they dislike (irrespective of my or your stances on what they should like or whether their claimed reasons for dislike is "bogus"). Nobody is compelling you to abandon perl. So what's your problem with them not using perl? A language is a UI for programmers. Some people find some UIs hard. Telling them that their discomfort is "bogus" is not very useful. I use a lot of Haskell. Many people say they find its type system, monads etc "too hard". That isn't a "bogus claim". And "If they really knew Haskell they wouldn't find it hard" (where I define the "really knew") is a useless statement. I use Haskell, they don't. Everyone is happy. Live and let live. There are enough languages for all of us.
- staunch 17y agoPerl requires that you learn a bit before you can be comfortable reading/writing it naturally. Like Japanese Katakana characters or the Cyrillic alphabet, a little investment goes a very long way. It's not nearly as alien as it appears at first glance. Some people think Perl is a good deal more expressive and powerful for them. A whole lot more people would if they managed to get past their initial reaction. Python probably owes most of its success to its simplistic syntax. That is definitely a feature when you're learning. When you're going to spend years with a tool though it's often worth investing some time into new concepts. More people should probably learn Haskell if they want to be better programmers. I think more should learn Perl too.
- plinkplonk 17y ago"Perl requires that you learn a bit before you can be comfortable reading/writing it naturally. Like Japanese Katakana characters or the Cyrillic alphabet, a little investment goes a very long way. It's not nearly as alien as it appears at first glance." This is, no doubt, true. But if people find that for a lesser investment (in say Python or Ruby) they can get all the (or almost all the) benefits of learning perl, it is natural they prefer those languages. If a hypothetical English speaker were to be given the choice of learning French or Japanese and if he could get his work done with either language equally well (this is where programming languages differ from spoken languages) why is it a problem that someone chooses to learn French (an English speaker could be fluent in french in year or so, Japanese would take years) instead of Japanese? A Chinese speaker might prefer to learn Japanese vs French and that's fine too. Focussing on perl specifically, unless I am maintaining a legacy codebase or I have a situation where libraries I need exist only in perl (and not, say in Python) why should I learn perl in preference to (say) Python? I can imagine making a case for learning Haskell in preference to Python (or vice versa!) but perl Python and Ruby are largely equivalent in practice and at least to some people Python is easier to read than perl. "Some people think Perl is a good deal more expressive and powerful for them. A whole lot more people would if they managed to get past their initial reaction." I agree. The counterpoint is that there are equally powerful and expressive languages where I don't need to get past the initial reaction. To some people aesthetics matter. And aesthetics is subjective.
- jjs 17y ago> The only people that can't read their own Perl after 6 months are the people that don't really know Perl. And by "know" I just mean they read and understood most of Programming Perl/Objected Oriented Perl. Python taught me that there's no excuse for a language to have a learning curve like Perl's.
- staunch 17y agoSo no language should use any syntax/concepts that aren't familiar to someone who only knows Java/C?
- jjs 17y agoNo; no [programming] language should require two books and several months to be fluent in.
- gdp 17y agoThat's actually almost exactly the same thing as claiming that no language should be very different to everything else that has come before it. I'm really not a Perl fan, but I really don't buy readability arguments. I'm a functional programmer, and the exact same feeble criticisms are leveled against ML and Haskell and Lisp and Scheme and whatever else. People say "ugh! It's so unreadable!", when they really mean "I can't read that having spent 2 days learning this new language, but I find it very easy to read C/PHP/Java/whatever, which I've been doing for several years". It can take a very, very long time to actually become fluent in a programming language and paradigm to the point where you actually have a mental model of its semantics that is aligned with reality. This is why rookie programmers tend to get things wrong. I spent almost 6 months learning Prolog. If I went and tried to write prolog now, I doubt I could remember very much at all. I've done C for more like 10 years, and I can still write C reliably despite not having touched it for 2 or 3 years. So I don't buy it. I'm really not a Perl fan (nor a Python fan), but the idea that it's worse than python because it requires more intellectual effort to learn is bullshit, unless you're having a programming-for-people-of-limited-intelligence competition.
- rw 17y ago> Any language, no matter how obscure, will have some practitioners who can read any code written in it. So you haven't seen the Malbolge language, then? http://www.lscheffer.com/malbolge.shtml http://www.lscheffer.com/malbolge.shtml
- kragen 17y agoWhile APL has its problems, baroque syntax is certainly not among them! You can write an APL parser on a napkin. With a felt-tip marker.