Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Well, I think that your accusations are somewhat unfounded.. I have some sympathy to your point of view, especially if you're relatively new to Perl and shell script like languages... but here are some thoughts on this... Firstly, read perlstyle.. As in arhuman's sig, "Only Bad Coders code badly in Perl"... For the most part, I have found Perl to be a very concise and intuitively appealing language.. why I say this is because it has lots of constructs that are similar to natural language..and furthermore, you'll find the reference above gives an explanation for when "an if after the code" is appropriate.... One of my coworkers *always* laughs when he sees "or die" and "carp" :o), but they accurately describe what the function is supposed to do, and that sounds like a good thing to me... Next, have you heard of the obfuscated C contest ? Look here for frightful examples of C code... its not just Perl, its any language you can think of, *every* language has the potential for bad code.. Readability is a big big win, I don't dispute that.. but sometimes, what may not seem readable to you may well be easy to someone who has actually taken the time out to understand the construct...Perhaps you need to know a little bit more Perl ? things may suddenly become easier to read and understand when you've been exposed to the language a bit more.. I certainly found that to be the case for me... However, just so you don't get the impression that I'm dismissing your concerns, this is an article I think a lot of Perl programmers should read..especially if you write Perl code for a living... Finally, TIMTOWTDI applies to Perl code.. perhaps you can learn a more efficient way of doing something by looking at someone elses code.. I know I have...
In reply to Re: Perverse Unreadable Code
by tinman
|
|