-----Original Message-----
        From: [EMAIL PROTECTED] 
        [mailto:[EMAIL PROTECTED]
        m] On Behalf Of Cliff Bamford
        Sent: Thursday, July 14, 2005 12:03 AM
        To: perl-win32-users@listserv.ActiveState.com
        Subject: RE: Change in "goto" behavior
        
        Dijkstra should have titled his letter "Stupid 
        programmers considered harmful". A good programmer will 
        write good code no matter how liberal the language, and 
        a bad programmer will write bad code no matter how 
        restrictive the language. 
        
        Since someone asked, there's one situation where goto's 
        are the best answer, even in fully structured 
        languages:  When you need to use a multitude of deeply 
        and unevenly nested blocks to determine if some complex 
        situation obtains, and there are several points in the 
        nests at which the answer is determined.  From each of 
        those points you goto some code which does its thing 
        and then exits, never trying to re-enter the nest.  The 
        alternative to goto in this one case is artificially 
        contrived blocks that amount to structure for structure's sake.
        
        That's just an elaboratiuon of what $Bill said.   Now 
        can we end this
        religious discussion?
        
        Cliff
        
        > Behalf Of $Bill Luebkert
        > > My previous message was attached to the wrong posting.
        > > 
        > > I doubt very much whether there is any occasion where gotos
        > are "most
        > > appropriate."   Please provide an example.
        > > 
        > > Check ot http://www.acm.org/classics/oct95/  "Go To 
        Statement 
        > > Considered Harmful" by Edsger W. Dijkstra
        > 
        > In structured programming practice, a goto would be totally 
        > inappropriate.
        > 
        > But ...  when you look at how a switch is implemented 
        in actuality, 
        > it's full of goto's.
        > 
        > I guess the point is that you should leave the gotos 
        to the underlying 
        > generated compiler code and not use it yourself.
        > But if your language is lacking on suitable 
        constructs, you may be 
        > forced to use a goto just to save all the otherwise 
        unnecessary code 
        > to go structured.
        > 
        > My suggestion - avoid if possible - else use cautiously and 
        > infrequently.
        > 
        > > On 7/13/05, Michael Erskine 
        <[EMAIL PROTECTED]> wrote:
        > > 
        > >>On Wednesday 13 July 2005 13:30, Hugh Loebner wrote:
        > >>
        > >>>Why on earth are you using a goto statement? They 
        are pernicious.
        > >>
        > >>On the contrary, a goto is often most appropriate in
        > expressing clear
        > >>program flow.
        
        _______________________________________________
        Perl-Win32-Users mailing list
        Perl-Win32-Users@listserv.ActiveState.com
        To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
        

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to