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 343: Editorial disagreement: domain conditions before or after basic explanations?

2012-10-15 11:48:45
WG1 - Core
alexshinn
major
cowan
fixed
source
closed
2012-02-20 03:46:06
defect

R5RS sometimes places the domain conditions of a procedure before its explanation. For example, map is defined thus:

The lists must be lists, and proc must be a procedure taking as many arguments as there are lists and returning a single value. If more than one list is given, then they must all be the same length. Map applies proc element-wise to the elements of the lists and returns a list of the results, in order. The dynamic order in which proc is applied to the elements of the lists is unspecified.

The equivalent language in R7RS draft 6 says:

It is an error if proc does not accept as many arguments as there are lists and return a single value. The map procedure applies proc element-wise to the elements of the lists and returns a list of the results, in order. If more than one list is given and not all lists have the same length, map terminates when the shortest list runs out. It is an error for proc to mutate any of the lists. The dynamic order in which proc is applied to the elements of the lists is unspecified. If multiple returns occur from map, the values returned by earlier returns are not mutated.

Note that the statement that the lists must be lists has been removed, being subsumed by the list of naming conventions in 1.3.3.

Cowan thinks this paragraph would be more readable if the purpose of map appeared first, as this is the topic sentence, thus:

The map procedure applies proc element-wise to the elements of the lists and returns a list of the results, in order. If more than one list is given and not all lists have the same length, map terminates when the shortest list runs out. It is an error if proc does not accept as many arguments as there are lists and return a single value. It is also an error for proc to mutate any of the lists. The dynamic order in which proc is applied to the elements of the lists is unspecified. If multiple returns occur from map, the values returned by earlier returns are not mutated.

Shinn disagrees and insists on a vote, although there is no difference in substance.

statusnewdecided

The WG voted to reject this proposal and leave the domain information in place, but to separate the additional domain restrictions from the initial description, as a separate short paragraph immediately following the prototype, possibly de-emphasized by making it smaller. This would keep the domain in one place and still allow the first line of the description stand out prominently in the initial paragraph.

statusdecidedwriting
resolutionfixed
statuswritingclosed