148 lines
7.4 KiB
HTML
148 lines
7.4 KiB
HTML
<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>CLHS: Issue REQUIRE-PATHNAME-DEFAULTS-YET-AGAIN Writeup</TITLE>
|
|
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
|
|
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
|
|
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
|
|
<LINK REL=TOP HREF="../Front/index.htm">
|
|
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
|
|
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
|
|
<LINK REL=PREV HREF="../Issues/iss294_w.htm">
|
|
<LINK REL=UP HREF="../Issues/iss295.htm">
|
|
<LINK REL=NEXT HREF="../Issues/iss296_w.htm">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss294_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss295.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss296_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<H2>Issue REQUIRE-PATHNAME-DEFAULTS-YET-AGAIN Writeup</H2>
|
|
|
|
<PRE><B>Forum:</B> Public Review<P>
|
|
<B>Issue:</B> <A HREF="iss295.htm">REQUIRE-PATHNAME-DEFAULTS-YET-AGAIN</A><P>
|
|
<B>References:</B> Barrett's public review comment #26<P>
|
|
Loosemore's public review comment #7<P>
|
|
<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A><P>
|
|
Issue <A HREF="iss296.htm">REQUIRE-PATHNAME-DEFAULTS</A><P>
|
|
Issue <A HREF="iss294.htm">REQUIRE-PATHNAME-DEFAULTS-AGAIN</A><P>
|
|
<B>Category:</B> CHANGE<P>
|
|
<B>Edit history:</B> 20 Dec 1992, Version 1 by Loosemore<P>
|
|
<B>Status:</B> Proposal RESTORE-ARGUMENT passed 11-0 on letter ballot<P>
|
|
92-302.<P>
|
|
<P>
|
|
<P>
|
|
<B>Problem description:<P>
|
|
</B><P>
|
|
In the base document (CLtL), the <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> function was specified as<P>
|
|
accepting a required module name argument and an optional <A REL=DEFINITION HREF="../Body/a_pn.htm#pathname"><B>pathname</B></A><P>
|
|
argument. In the current specification, the optional <A REL=DEFINITION HREF="../Body/a_pn.htm#pathname"><B>pathname</B></A><P>
|
|
argument has been removed. The rationale given for this in<P>
|
|
X3J13/91-415 is that it was the second argument that led to<P>
|
|
portability problems. This claim is incorrect. It was the case that<P>
|
|
both the one argument and the two argument forms had portability<P>
|
|
problems in the past, but the addition of logical pathnames made the<P>
|
|
two argument version easier to use in a portable way. Elimination of the<P>
|
|
second argument means that we're left with the same problem the single<P>
|
|
argument form has always had, namely that there are several competing,<P>
|
|
incompatible mechanisms for dealing with the situation where the<P>
|
|
module being required has not already been provided.<P>
|
|
<P>
|
|
<P>
|
|
<B>Proposal (REQUIRE-PATHNAME-DEFAULTS-YET-AGAIN:RESTORE-ARGUMENT):<P>
|
|
</B><P>
|
|
Restore the optional <A REL=DEFINITION HREF="../Body/a_pn.htm#pathname"><B>pathname</B></A> argument to <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>, as specified<P>
|
|
in the base document.<P>
|
|
<P>
|
|
Replace the examples with ones that better illustrate portable and<P>
|
|
nonportable uses of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>, such as those suggested below.<P>
|
|
<P>
|
|
<P>
|
|
<B>Rationale:<P>
|
|
</B><P>
|
|
Restoring the second argument makes it at least *possible* to use<P>
|
|
<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> in a portable way.<P>
|
|
<P>
|
|
<P>
|
|
<B>Examples:<P>
|
|
</B><P>
|
|
;;; This illustrates a nonportable use of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>, because it<P>
|
|
;;; depends on the implementation-dependent file-loading mechanism.<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> "CALCULUS")<P>
|
|
<P>
|
|
;;; This use of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> is nonportable because of the literal <P>
|
|
;;; physical <A REL=DEFINITION HREF="../Body/a_pn.htm#pathname"><B>pathname</B></A>. <P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> "CALCULUS" "/usr/lib/lisp/calculus")<P>
|
|
<P>
|
|
;;; One form of portable usage involves supplying a logical <A REL=DEFINITION HREF="../Body/a_pn.htm#pathname"><B>pathname</B></A>,<P>
|
|
;;; with appropriate translations defined elsewhere.<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> "CALCULUS" "lib:calculus")<P>
|
|
<P>
|
|
;;; Another form of portable usage involves using a variable or<P>
|
|
;;; table lookup function to determine the <A REL=DEFINITION HREF="../Body/a_pn.htm#pathname"><B>pathname</B></A>, which again<P>
|
|
;;; must be initialized elsewhere.<P>
|
|
<P>
|
|
(<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>require</B></A> "CALCULUS" *calculus-module-pathname*)<P>
|
|
<P>
|
|
<P>
|
|
<B>Current practice:<P>
|
|
</B><P>
|
|
Who knows?<P>
|
|
<P>
|
|
<P>
|
|
<B>Cost to implementors:<P>
|
|
</B><P>
|
|
Minor.<P>
|
|
<P>
|
|
<P>
|
|
<B>Cost to users:<P>
|
|
</B><P>
|
|
None.<P>
|
|
<P>
|
|
<P>
|
|
<B>Aesthetics:<P>
|
|
</B><P>
|
|
Having a feature in the language which is impossible to use portably<P>
|
|
is unaesthetic.<P>
|
|
<P>
|
|
<P>
|
|
<B>Editorial impact:<P>
|
|
</B><P>
|
|
The changes are confined to the dictionary entry for <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>.<P>
|
|
<P>
|
|
<P>
|
|
<B>Discussion:<P>
|
|
</B><P>
|
|
The proposal to restore <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> to the language without its second<P>
|
|
argument was brought up at the Dec 1991 meeting without the benefit of<P>
|
|
a formal writeup or any advance discussion on the mailing list, which<P>
|
|
accounts for the resulting technical blunder. We don't have a very<P>
|
|
good record when it comes to technical decisions made on the fly at<P>
|
|
meetings.<P>
|
|
<P>
|
|
Loosemore says: I would still prefer to remove this broken feature<P>
|
|
from the language entirely, but I'd rather not waste any more time<P>
|
|
arguing about that given that some people seem to feel strongly about<P>
|
|
keeping it in. I'm willing to accept proposal RESTORE-ARGUMENT<P>
|
|
as a compromise, but doing nothing would not be acceptable to me.<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
<P>
|
|
</PRE>
|
|
<HR>
|
|
|
|
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
|
|
|
|
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
|
|
</BODY>
|
|
</HTML>
|