TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CHRIS DOWNS
from: DARIN MCBRIDE
date: 1997-09-14 08:45:00
subject: Re: WHY THE BRACES?

 DM> Single entry.  Single exit.  Flow always goes 
 DM> down, except in properly
 DM> defined structural loops (while, do while, for).  Clean-up code will
 DM> always get executed.  Adding extra clean-up code will not break
 DM> anything - it will also get executed every time because it is part of
 DM> the single exit. 
 CD>  
 CD>  Yeah... I've seen such things.  It's not the only way to do it.
 CD>  Nor are alternative methods (IMO) "less readable".
Without writing every pointer-resource into classes, I've been hard pressed 
to find other ways of doing it.  Perhaps an example, Chris?
 DM> In C++, however, I can avoid most of this, if not all of it.  
                                  ^^^^
 CD>  Which echo are we on?
Not all the time can I avoid it.  Often writing a dozen small classes that 
handle resources is less readable than the goto.
 DM> I wish all my programs were so simple and never needed modification
 DM> like that.  Unfortunately, the rest of us live in 
 DM> the real world where
 DM> requirements change faster than we can code them in.  
 CD>  
 CD>  What can I say?  If you find yourself painted into a corner, you have
 CD>  to take drastic measures.  I still think that avoiding getting stuck
 CD>  in the corner makes more sense.  I don't see where program size nor
 CD>  complexity matter there.
If you have time to avoid getting stuck, perhaps.  (Now we get back to 
management... )
 DM> (We need better
 DM> managers, yes.  However, that's another real-world factor we have to
 DM> live with.  I can't afford to change jobs within 4 months of starting
 DM> my last one - it just looks bad.) 
 CD>  Not necessarily.  Right now, the programming job market
 CD>  is so tight that the 4 months of experience would qualify you as
 CD>  an certified expert!
Except that I'd probably move ... and moving is such a pain.  :-)
 DM> [Sorry, Mr. Moderator, but he's been using that "real-world" line so
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.