1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Issues/iss296_w.htm

136 lines
9.6 KiB
HTML
Raw Normal View History

2024-04-01 10:24:07 +02:00
<!-- 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 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/iss295_w.htm">
<LINK REL=UP HREF="../Issues/iss296.htm">
<LINK REL=NEXT HREF="../Issues/iss297_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/iss295_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss296.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss297_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue REQUIRE-PATHNAME-DEFAULTS Writeup</H2>
<PRE><B>Issue:</B> <A HREF="iss296.htm">REQUIRE-PATHNAME-DEFAULTS</A><P>
<B>References:</B> <A REL=DEFINITION HREF="../Body/v_module.htm#STmodulesST"><B>*MODULES*</B></A>, <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A>, <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>, pp 188-191<P>
<A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A>, pp 426-427<P>
<B>Category:</B> CHANGE<P>
<B>Edit history:</B> Version 1 by Pierson 9/13/88<P>
Version 2 by Pierson 9/19/88, change <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> stuff per comments<P>
Version 3 by Pierson 10/17/88, remove <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> locaction specs.<P>
Version 4 by Pierson 10/31/88, remove from language<P>
Version 5 by Pierson 11/15/88, cleanup, fix discussion<P>
Version 6 by Pierson 12/9/88, remove <A REL=DEFINITION HREF="../Body/v_module.htm#STmodulesST"><B>*MODULES*</B></A> as well<P>
<P>
<B>Problem description:<P>
</B><P>
<A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> are a dual-purpose pair of functions that attempt<P>
to <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>provide</B></A> multi-file Common Lisp programs with a single mechanism to<P>
detect and correct incorrect load sequences. These functions were<P>
also designed to be used for general file inclusion in Common Lisp.<P>
Unfortunately, the file loading feature of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> is specified such<P>
that it is inherently non-portable and environment dependent.<P>
<P>
<B>Proposal (REQUIRE-PATHNAME-DEFAULTS:ELIMINATE):<P>
</B><P>
Remove <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A>, <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>, and <A REL=DEFINITION HREF="../Body/v_module.htm#STmodulesST"><B>*MODULES*</B></A> from the Common Lisp <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A>.<P>
<P>
<B>Test Cases/Examples:<P>
</B><P>
(<A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> 'fft)<P>
<P>
Would not be Common Lisp.<P>
<P>
(<A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> 'fft)<P>
<P>
Would not be Common Lisp.<P>
<P>
<B>Rationale:<P>
</B><P>
The file loading feature of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> is non-portable. The remaining<P>
functionality of <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> (pushing and testing <A REL=DEFINITION HREF="../Body/v_module.htm#STmodulesST"><B>*MODULES*</B></A>)<P>
can easily be implemented by user code. Since some implementations<P>
will retain the automatic module loading features of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> and some<P>
won't, use of <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> will almost always make code less portable.<P>
<P>
<B>Current practice:<P>
</B><P>
All implementations currently support some sort of file loading via<P>
single-argument <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A>. In general, the Lisp Machine implementations<P>
invoke the system module building/loading facility while the Unix<P>
implementations simply try to load a file in the current directory.<P>
<P>
<B>Cost to Implementors:<P>
</B><P>
Implementations will have to move <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> to their package<P>
for implementation extensions and change their documentation to<P>
indicate that <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> are non-standard. This is a fairly<P>
small change.<P>
<P>
<B>Cost to Users:<P>
</B><P>
Non-portable programs that rely on <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> will probably<P>
be unaffected since implementations will probably maintain their<P>
existing functionality. Since the current behavior is decidedly<P>
non-portable, portable programs have to aviod or special-case <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A><P>
and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> anyway.<P>
<P>
<B>Cost of non-Adoption:<P>
</B><P>
<A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> will continue as impediments to portability.<P>
<P>
<B>Benefits:<P>
</B><P>
The non-portability of <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> will be made obvious.<P>
<P>
<B>Aesthetics:<P>
</B><P>
This simplifies the language by removing an environment-dependent<P>
feature. <P>
<P>
<B>Discussion:<P>
</B><P>
The cleanup committee tried to come up with a proposal to restrict<P>
<A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> to the portable subset of their functionality.<P>
This failed because several implementors objected that it compelled<P>
them to significantly reduce the functionality they provided users in<P>
order to create a trivial feature which any user could easily write<P>
for herself.<P>
<P>
Fahlman, Gregor, Grey, Loosemore, Moon, Pierson, Pitman, Steele, and<P>
Zacharias have expressed support for removing <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> from<P>
the language, at least as the lesser of several evils.<P>
<P>
JonL would much rather see <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> remain in the language<P>
as a safety net behind any implementation-specific system building<P>
facility. Pierson likes the safety net idea, but doesn't think it's<P>
workable without forbidding <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> from loading files.<P>
<P>
Pitman suggested that <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> should be depricated rather<P>
than removed entirely. Pierson agrees, but notes that Larry wants us<P>
to deal with deprication versus elimination as a separate global topic.<P>
<P>
Several people have expressed a desire not to break existing user<P>
code. If accepted, this proposal should not break existing code<P>
because all implementations are expected to retain their current<P>
<A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>PROVIDE</B></A> and <A REL=DEFINITION HREF="../Body/f_provid.htm#require"><B>REQUIRE</B></A> functionality as an extension to Common Lisp.<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>