larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

Library paths should default to extending, not overriding #719

Closed WillClinger closed 7 years ago

WillClinger commented 9 years ago

In Larceny v0.98, extensions to Larceny's library path cause files found within the extension directories to be searched before the standard library files. That's especially dangerous because Larceny's library search stops as soon as it finds the first file whose name indicates it might contain the library. (For an example, see ticket #718.)

Larceny should allow users a choice between extending or overriding, with extending the default instead of overriding.

Gauche offers the following options, which Larceny might well emulate:

  -I<path> Adds <path> to the head of the load path list.
  -A<path> Adds <path> to the tail of the load path list.
  -u<module> (use) load and import <module>
  -l<file> Loads <file> before executing the script file or
           entering repl.
  -L<file> Like -l, but doesn't complain if <file> doesn't exist.
  -e<expr> Evaluate Scheme expression <expr> before executing
           the script file or entering repl.
WillClinger commented 7 years ago

Added by changeset e9ec34c9a4169d3d4b7d77145afbf40033a3bdf6