Loading ...
Sorry, an error occurred while loading the content.

RE: [XP] How to code an infinite loop (was: What do you thinkabou t these two coding idioms?)

Expand Messages
  • Robert Sartin
    ... Really? Java s not smart enough to remove tail recursion? No wonder Java programmers don t get tail recursion. Regards, Rob
    Message 1 of 9 , Feb 28, 2001
    • 0 Attachment
      --- "Baker, Bram " <bram.baker@...> wrote:
      > int getChoice() {
      ...
      > return getChoice();
      > }
      > }
      > This does remove the infinite smell. This will not execute forever,
      > 'cause at some point you'll blow the stack, which will be the end of
      > your program.

      Really? Java's not smart enough to remove tail recursion? No wonder
      Java programmers don't "get" tail recursion.

      Regards,

      Rob


      __________________________________________________
      Do You Yahoo!?
      Get email at your own domain with Yahoo! Mail.
      http://personal.mail.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.