Subject: Re: [clisp-list] File error in clisp 2.28/cygwin testsuite execut ion: delete-file

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Mon Mar 11 01:37:02 2002

Hi,

please don't add yet another behaviour variant depending on the symbol-macro-variable *ANSI*! Returning a pathname is IMHO within the ANSI specification (keyword: generalized boolean).

> > According the CLHS, on delete-file
> >   delete-file filespec => t
> > 
> >   It is implementation-dependent whether an attempt to delete a
> >   nonexistent file is considered to be successful.
> > 
> >   delete-file returns true if it succeeds, or signals an 
> error of type
> >   file-error if it does not.

> > as is Clisp [non-conformant] returning the pathname of the deleted file.
> well, the pathname is "true", so this complies with the third 
> paragraph you site (but not with the first one).
> I think returning the path of the deleted file is a useful extension
> which cannot possibly break anything, but if you wish you may disable
> it when *ansi* is T.

No! let's stay serious. No more *ANSI* #ifdef. Prevent us from configuration nightmares. Let's keep software usable. Just stick to the third paragraph from CLHS (true means generalized boolean).

The CLHS says http://www.xanalys.com/software_tools/reference/HyperSpec/Body/26_glo_t.htm#true
 "true n. any object that is not false and that is used to represent the success of a predicate test. See t[1]."
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/26_glo_g.htm#generalized_boolean
 "generalized boolean n. an object used as a truth value, where the symbol nil represents false and all other objects represent true. See boolean."

> I want CLISP to return the path of the file if it was found and
> deleted (or T if *ansi* is T), T if the file was not found (for any
> reason whatsoever) and signal an error when the file was 
> found but could not be deleted.

This "official" CLISP behaviour should then be sanctioned in impnotes so people know what to expect.
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/26_glo_i.htm#implementation-dependent
 "implementation-dependent adj. [...] A conforming implementation is encouraged (but not required) to document its treatment of each item in this specification which is marked implementation-dependent, [...]"

DELETE-FILE is not currently mentioned in the impnotes.

Regards,
	Jorg Hohle.

---

From: lin8080 <[email-masked]>
Date: Mon Mar 11 22:43:05 2002

hallo

> DELETE-FILE is not currently mentioned in the impnotes.

I found this in the ../HyperSpec/Body/fun_delete-file.html

...............
Description:

Deletes the file specified by filespec. 

If the filespec designator is an open stream, then filespec and the file
associated with it are affected (if the file system permits), in which
case filespec
might be closed immediately, and the deletion might be immediate or
delayed until filespec is explicitly closed, depending on the
requirements of the file
system. 

delete-file returns true if it succeeds, or signals an error of type
file-error if it does not. 

The consequences are undefined if filespec has a wild component, or if
filespec has a nil component and the file system does not permit a nil
component.
................

> No! let's stay serious. No more *ANSI* #ifdef. 
> Prevent us from configuration nightmares.
> Let's keep software usable.

please do so.

stefan