I think that it should be that the behavior of / 0 and % 0 is consistent. So if the approach to avoid runtime exceptions is to do math wrong, then both should always return 0.
Its not easy to reconcile infinities with integer math and no runtime exceptions; something in that triangle has to give. However, once it is decided that ‘no runtimes’ is the top priority then applying that would yield a consistent approach at least.
I wonder, is this stuff actually going to get fixed in 0.19? Strikes me that Elms math issues could be tabulated on a single page, a consistent approach to fixing them decided upon, and open them up to contributors submitting PRs to fix them. “Code isn’t the problem” for Elm, but I think in this case there is an hour of thinking and deciding to be done, and lots of little bits of coding that is not particularly challenging or fun but that the community would certainly get done.
Anyway, hope yous all have a good Christmas holidays.