[r6rs-discuss] [OT] Should compilers preserve termination?
bear wrote:
> But the other camp says that "we presume that the code is
> error-free; if the only non-error result is known in
> advance, we may optimize the process by eliding the
> computation."
>
It seems that some people here think that an infinite loop is by
definition an error. I don't agree with this. As a programmer I quite
often find myself writing infinite loop on purpose. Often (but not
always) they have some kind of side-effect, like printing something.
I think that a language that would allow optimizing away loops with
side-effects would be plain stupid. Optimizing away infinite loops
without side-effects would only be irritating and would violate the
principle of least surprise.
/Mikael
Received on Fri Mar 09 2007 - 04:10:31 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC