develooper Front page | perl.perl5.porters | Postings from May 2000

Re: Thoughts on maintaining perl

Thread Previous | Thread Next
David H. Adler
May 25, 2000 13:25
Re: Thoughts on maintaining perl
Message ID:
On Thu, May 25, 2000 at 03:27:51PM -0400, wrote:

>   print join ",", map { &{$field_info{$_}{format}}($deal) } @fields;
> It took me some time to figure out what that construct meant and where
> the actual formatting information was.  His argument was that this was
> a perfectly fine thing to do.  He did it all of the time, and it
> allowed you to separate presentation from content.  He admitted that
> the first time you saw it, it looked a bit strange, but if you knew
> what it did...
> That turned out to be a good lesson for me.  This construct really was
> integral to his style, and once I got past the shock of that line it
> really was maintainable.

The question that springs to my mind is "was there a comment
explaining this?"  If not, would that have prevented it from "stopping
you in your tracks"?  Also, if not, hurt that man. :-)

It seems to me that if you have code that might look a bit obscure,
but can be comprehended with little trouble if you know what it's
*supposed* to do, then you *tell* people what it's supposed to do.

Again, not an issue with the language, but with the programmer.

*sprinkles IMHOs around to cover his tracks*  :-)


David H. Adler - <> -
We went on holiday by mistake	- Withnail

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About