Hugh Loebner wrote:

> 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.

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to