NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
You are an idiot (Score:1)
Just look at it:
That’s clearly orders of magnitude easier to read than the Perl version.
Re: (Score:1)
Oh wait, it has to be this:
Or possibly chain the methods.
Perl can’t hold a candle to any of that.
Re: (Score:2)
Re: (Score:2)
Sometimes I worry that the chorus of "Perl, in a Nutshell" will damage Perl's reputation ("it's so easy to write, but it's not always easy to read"). Then I think, if only I could be so lucky!
Re: (Score:1)
No programming language is readable until someone invents a programming language that reads like a native language. Think Pseudo-code, and THAT is readable (or at least you'll get the idea...) However, no-one has made a REAL language like that. Yet.
I've been to
You obviously have a lot to learn (Score:1)
After that you'll understand things like the inherent tradeoffs in commenting. It isn't as simple as "comments aren't done." And it isn't as simple as "comments make things readable." Instead it is much closer to, "comments are helpful but untrustworthy." Which is why there is a big emphasis on making your code (which can be trusted much more since errors there get noticed and fixed) read as much like comments as possible. (Much easier s
Re:You obviously have a lot to learn (Score:1)
My original comments came from the fact I do black box testing at work, and have recently started to approach the source code. One way I find comments helpful is when they describe what the following function is supposed to do. If I just read through the function (slowly...
Of course, given time I hope I'll find code as readable as you all. Right now it's a barely readable black box (to me) but wish me luck and I'll be around.
And thank you btilly, chromatic and pudge for your comments and direction!
Reply to This
Parent
Re: (Score:1)
The explicit or implicit API presented by a function should not (lightly) be changed. Therefore it is often worthwhile to comment on that. And it is always worthwhile to pick a function name that tells you what it means. However the mechanics of how the function works internally should not generally be commented.
That said, there isn't an
Re: (Score:1)
Also very important is your knowledge of the problem domain.