[m-dev.] question about infinite recursion warnings

Julien Fischer jfischer at opturion.com
Tue Apr 23 11:26:01 AEST 2019



On Sat, 20 Apr 2019, Zoltan Somogyi wrote:

> My question is: should I enable the new warning, either with
> or without this extra proviso, anyway? We could avoid the problem
> with --halt-at-warn by disabling infinite recursion warnings
> either module-wide (in Mercury.options), or just for the calls
> involved using the disable_warnings scope. The latter would
> require bootstrapping the change to the scope.
>
> Basically, my question boils down to: which is more annoying?
> Not getting an infinite recursion warning when you should,
> in situations resembling the one above, or getting one when
> you shouldn't?

I agree with Peter here, warning about probable (as opposed to definite)
infinite recursion should be opt-in by default, so you should add a
new option that controls whether the extra heuristics are enabled.
(I have no objection to enabling the new option for the Mercury system
itself.)

Julien.


More information about the developers mailing list