home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13026 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.1 KB

  1. Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb
  2. From: tmb@arolla.idiap.ch (Thomas M. Breuel)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: GOTO, was: Tiny proposal for na
  5. Message-ID: <TMB.92Aug28192826@arolla.idiap.ch>
  6. Date: 28 Aug 92 23:28:26 GMT
  7. References: <714668024@thor> <6800007@tisdec.tis.tandy.com>
  8.     <1992Aug26.130335.26725@hemlock.cray.com>
  9.     <MATT.92Aug26122422@physics16.berkeley.edu> <rmartin.714929724@thor>
  10. Sender: news@ai.mit.edu
  11. Reply-To: tmb@idiap.ch
  12. Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
  13.     Perceptive)
  14. Lines: 11
  15. In-reply-to: rmartin@thor.Rational.COM's message of 27 Aug 92 15:35:24 GMT
  16.  
  17. In article <rmartin.714929724@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  18.  
  19.    Goto has never been a "good" way to implement FSMs.  Nested
  20.    switch/case statements which use a State variable and transition codes
  21.    are more traditional, easier to maintain, and do not use goto.
  22.  
  23. That depends on your application. For the inner loop of a GC, an FSM
  24. implemented with "goto" might be significantly faster than an FSM
  25. implemented with state variables and transition codes.
  26.  
  27.                     Thomas.
  28.