[p5p excised]

At 01:53 PM 5/25/00 -0400, Chris Nandor wrote:
>    my $mode =
>         (ref $hash->{CALLBACK} eq 'CODE'
>             ? kAEQueueReply
>             : (exists $hash->{REPLY}    # check event setting

I question the usefulness of naming a hashref $hash...

>I did format the above code so it is readable to me and to perhaps others,
>but then I think I came up with a good rule of thumb: if you have to spend
>more time thinking about how to format it for readability than you did
>thinking about how to code it in the first place, then it probably needs to
>be rewritten.

I dunno; I can just hit <TAB> in cperl-mode and get more or less what you 
have.  And generally when I have to correct it it's not my fault.

I was quite taken with the last Obfuscated Perl Contest comment about 
Befunge that "it is the sort of language that one might have a 
Comprehensible Befunge Contest for."  I have occasionally wondered whether 
a Clear Perl contest would be useful, but it certainly wouldn't be as 
exciting :-)

There is something to be said for conciseness, though, in that being able 
to read more functionality at a glance can increase readability.  When I 
look at the C source for Harvest (search engine), it spends pages doing 
things that can be done in a line of Perl (yes, I know about 
Harvest-NG).  I get to the bottom of one page saying to myself, "Okay, so 
now they've built the linked list of thingy structs which were parsed out 
from whatsit... now just why were they doing that again???" <flip, flip>
--
Peter Scott
Pacific Systems Design Technologies

Reply via email to