This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

include vs include-relative


The question raised by Seth is: should the include form *by default* act
like include-relative by first searching relative to the current file?

This question only changs the default  and it's a 1-line change, so it
easy to make.  More detail:

Option 1: The default search order include, as currently checked in:
First current working directory (as returned by (current-path); then the
directory of the file containing the include form.  Or expressed in the
syntax of the kawa.include.path property: ".:|"

Option 2: The other way round, i.e. "|".".  The makes the default for include
the same as the default for include-relative.

Regardless: The would only change the default.  Setting the kawa.include.path
property (or the Include.searchPath ThreadLocal) overrides the default path.

Also regardless: include-relative would search the directory of the file containing
the include form, and *then* whatever search path is specified for include (default
or non-default).

Advantage of Option 1: Better historical compatibility.  Plus it's weird having
both include and include-relative if they do the same thing (at least by default).

Advantage of Option 2: 99% of the time you probably *do* want to first search
relative.  Plus it is more compatible with spirit of the r7rs recommendation.

Anyone else have an opinion?
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]