Comment

Comment by eru

Yes. The simplest example is when the loop has no other side-effects.

But you could also have something like:

  while(true) {
    if(some condition) {
      do stuff;
      break;
    }
  }
In this case, a compiler might be allowed to assume that 'some condition' happens to be true eventually.
parent eru 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton