Opened 5 years ago

Closed 5 years ago

#343 closed defect (fixed)

Editorial disagreement: domain conditions before or after basic explanations?

Reported by: cowan Owned by: alexshinn
Priority: major Milestone:
Component: WG1 - Core Keywords:
Cc:

Description

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.

Change History (3)

comment:1 Changed 5 years ago by cowan

  • Status changed from new to decided

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.

comment:2 Changed 5 years ago by alexshinn

  • Status changed from decided to writing

comment:3 Changed 5 years ago by cowan

  • Resolution set to fixed
  • Status changed from writing to closed
Note: See TracTickets for help on using tickets.