"numeric" formatter using undocumented state variables Marc Nieper-Wißkirchen (19 Feb 2019 12:00 UTC)
Re: "numeric" formatter using undocumented state variables Marc Nieper-Wißkirchen (19 Feb 2019 13:26 UTC)
Re: "numeric" formatter using undocumented state variables Marc Nieper-Wißkirchen (20 Feb 2019 16:01 UTC)

"numeric" formatter using undocumented state variables Marc Nieper-Wißkirchen 19 Feb 2019 12:00 UTC

(1) The reference implementation uses a number of state variables that
are not documented, for example, "sign-rule", "comma-rule", and
"comma-sep". If user code uses state variables with the same symbolic
name, the reference implementation may break.

The tests assume that particular implementation detail.

Note that the SRFI says (under the description of "numeric"): "These
parameters may seem unwieldy, but they can also take their defaults
from state variables, described below." This could mean that state
variables with the names "sign" and "comma" should be provided but the
reference implementation does not use state variables of these names.

To solve this issue, either the yet undocumented state variables have
to be documented or the reference implementation has to be changed
(easy as soon as we have hygienic state variables).

(2) In the numeric formatter, there is no way to specify, say, the
"comma-sep" parameter without specifying the "sign" parameter.
However, it is not documented which value is to be used for "sign" if
one wants the default (a minus sign for negative values and no sign
for positive values).

The tests rely on the reference implementation accepting the value "#f".