Opened 5 years ago

Closed 5 years ago

#449 closed defect (fixed)

Clarify library loading rules

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

Description

R7RS currently says:

Within a program, each imported library is loaded at least once, and, if imported by more than one program or library, may possibly be loaded additional times.

Richard Kelsey thinks this is too liberal, and proposes:

Regardless of the number of times that a library is loaded, each program or library that imports bindings from a library will receive bindings from a single loading of that library, regardless of the number of import or cond-expand forms in which it appears.

Aaron Hsu, however, thinks this is too restrictive, and proposes (backed up by actual R6RS implementations):

If a library's definitions are referenced in the expanded form of a program or library body, then that library must be loaded before the expanded program or library body is evaluated. This rule applies transitively.

Similarly, during the expansion of a library, if a syntax keyword imported from a library is needed to expand the library, then the imported library must be visited before the expansion of the importing library.

Change History (3)

comment:1 Changed 5 years ago by cowan

  • Status changed from new to decided

WG1 voted to adopt Hsu's proposal.

comment:2 Changed 5 years ago by cowan

  • Owner changed from alexshinn to cowan
  • 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.