[HARLEQUIN][Common Lisp HyperSpec (TM)] [Previous][Up][Next]


Forum:		Public Review


References: Loosemore's public review comment #6





Edit history: 21 Dec 1992, Version 1 by Loosemore

Status: Proposal INPUT-FILE passed 11-0 on letter ballot 93-302

Problem description:

It's stated that the input-file pathname to COMPILE-FILE is merged

against *DEFAULT-PATHNAME-DEFAULTS*, but nothing is said about

merging of the :OUTPUT-FILE pathname argument.

Some existing Common Lisp implementations appear to merge it against

the (merged) input-file pathname, and others appear to merge it against

*DEFAULT-PATHNAME-DEFAULTS*. In practice, this means that users always

have to do their own explicit merging before passing a pathname as the

:OUTPUT-FILE argument, which is a nuisance.

The discussion of pathname merging in CLtL (page 641 in CLtL-2)

presents a general model that seems appropriate:

"This is especially useful for cases such as a program that has

an input file and an output file.... Unspecified components of the

output pathname will come from the input pathname, except that

the type should not default not to the type of the input but to

the appropriate default type for output from this program."

However, this paragraph appears in a mangled form in draft 12.24

(the second paragraph of the description section on page 19-35),

which might be taken to imply that MERGE-PATHNAMES is supposed to

automagically determine an appropriate default type.


Clarify that the defaults for the output-file argument are taken

from the pathname that results from merging the specified

input-file argument with *DEFAULT-PATHNAME-DEFAULTS*, except that

the type should to default to the appropriate default type for

compiled files.

Instruct the editor to fix the problem noted with the cited

paragraph in the MERGE-PATHNAMES description (for example, by

restoring the CLtL wording).


This seems like the right model.

Current practice:

Varies, as noted in the problem description.

Cost to implementors:

Some implementations will have to change, but it's not a huge


Cost to users:

None, since implementations already vary.


Specifying this behavior is more aesthetic than leaving it


Editorial impact:

The change requires adding a sentence or two to the dictionary

entry for COMPILE-FILE and replacing one paragraph in that for



If the issue to extend COMPILE-FILE to accept an open stream as

an input-file argument passes (Pitmans' public review comment #14),

obviously the input file cannot provide any defaults if it is

an open stream that cannot be coerced to a pathname.

[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996, The Harlequin Group Limited. All Rights Reserved.