This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 140: Removing `quotient`, `remainder`, `modulo`

2012-08-27 06:57:41
WG1 - Core
alexshinn
major
cowan
wontfix
source
closed
2011-02-03 06:17:13
defect

Are we removing the IEEE Scheme functions quotient, remainder, and modulo from WG1 Scheme? If so, we need a special justification, due to the charter text:

Existing features of IEEE Scheme may be removed only if a strong case can be made that they are fundamentally flawed. Insofar as practical, the language should be backwards compatible with the IEEE standard, the R5RS standard, and an appropriate subset of the R6RS standard.

Here's what DivisionRiastradh says:

Unfortunately, most programming languages give nondescript names such as DIV(IDE), QUOT(IENT), MOD(ULO), and REM(AINDER) to these operations. The language should make clear to programmers what division operations their programs are performing, especially when negative dividends and divisors can arise, but perhaps may not often arise during testing.

[...]

The R5RS gives the names quotient and remainder to the truncating division operator pair, and the name modulo to the remainder half of the flooring division operator pair. For all these three procedures in the R5RS, the dividend may be any integer, and the divisor may be any nonzero integer.

On the other hand, we may prefer relegating them to a backward-compatibility module.

resolutionfixed
statusnewclosed

We voted to keep these.

resolutionfixed
statusclosedreopened

I'm reopening this ticket, because the circumstances have changed:

  • We now have the R5RS library, which captures all the R5RS names including these.
  • We no longer have the division library, so both old and new sets are in the base library, bloating it.
  • We have set a precedent by adopting the R6RS names inexact and exact, so we are now interpreting the charter as saying that function documented in IEEE must not be removed, rather than that names in IEEE must not be changed, particularly since the old names are still available in another library.
statusreopeneddecided

WG1 decided to make no change.

resolutionwontfix
statusdecidedclosed