>>>>> "JG" == Jim Gibson <jimsgib...@gmail.com> writes:

  JG> On 4/13/10 Tue  Apr 13, 2010  4:35 PM, "Mimi Cafe" 
<mimic...@googlemail.com>
  JG> scribbled:

  >> I think this will work, but is it elegant.?

  JG> Yes, it will work, and yes, it is elegant, as long as it encapsulates the
  JG> logic that is required by your program.

i disagree that it is elegant. too often if/else lists are not
needed. many can be replaced by dispatch tables. if one of the clauses
does just a return or next/last that can be replaced with a modifier or
shorter statement. without ANY serious work, i have over 10k lines of
perl code in one system with about 10 else's and maybe 3 elsif's. it
just is a matter of knowing how to manage flow control well and you
rarely need else's. 

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to