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 494: Including/loading doesn't belong in Scheme

2013-07-07 03:20:44
WG1 - Core
2013-05-12 23:20:17

John David Stone writes:

The include and include-ci syntaxes and the load procedure [...] don't belong in Scheme. They undermine the model of modular design and construction of programs that the library system so carefully promotes. Even if I never mention them, students will find out about them, use them inappropriately, and promptly confuse themselves and their lab partners.

I assume that the reference is to include and include-ci as general expression types (section 4.1.7), rather than as library declarations. In the latter role, they clearly promote rather than undermining modularity, by allowing code to be managed separately from its module wrapper, something not possible in R6RS without auxiliary and non-standard syntax-rules macros.

I agree that these expression types, though convenient for the working programmer, are pedagogically problematic. I believe, however, that the Racket approach of providing controlled sublanguages for students is appropriate here. In the alternative (as I believe Gambit may be going to do), these may simply be omitted from an implementation and the fact reported as a deviation from R7RS-small.

As for load, it has been part of Scheme since R3RS, and is equivalent to doing your own reading and eval-ing. To argue against it on principle is to argue against eval (which historically was not actually specified until R5RS, though in fact available in all implementations since the beginning). That is an argument that all Schemers respect: if it must be enforced, however, this can best be done outside the language.

It might be a good feature for an implementation to warn the programmer if the argument to load is a constant expression, and even suggest the use of include instead.


The WG decided by unanimous consent to take no action on this ticket.