why doesn't r5rs define delete-file ? 
Author Message
 why doesn't r5rs define delete-file ?

Since the effect of output to file procedures is "unspecified" when
the file exists.  In theory this is a big portability gap, because
there is no "file-exists?" procedure and no "file-delete" procedure
defined.  So now you have to depend on non-standard extensions.

So R5RS leaves you stuck with non-portable code.

I guess that maybe there is an SRFI lurking here somewhere, isn't there ?

Brian

--

   "There is no right place for the dead to live."

    -- Kai, last of the Brunnen-G



Sun, 28 Dec 2003 13:34:23 GMT  
 why doesn't r5rs define delete-file ?

Brian> Since the effect of output to file procedures is "unspecified" when
Brian> the file exists.  In theory this is a big portability gap, because
Brian> there is no "file-exists?" procedure and no "file-delete" procedure
Brian> defined.  So now you have to depend on non-standard extensions.

Brian> So R5RS leaves you stuck with non-portable code.

Brian> I guess that maybe there is an SRFI lurking here somewhere,
Brian> isn't there ?

Not yet.  It's somewhat harder to do right than it may look at first
sight.

--
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und berhaupt blabla



Sun, 28 Dec 2003 14:36:44 GMT  
 why doesn't r5rs define delete-file ?

  Michael> Not yet.  It's somewhat harder to do right than it may look at first
  Michael> sight.

Does that me you know of someone working on one ?  Or is one needed ?

And I most definitely did not say or imply it would be easy.  Nothing
done well ever is.  I'm just surprised that r5rs leaves it in this
state.  after all, this means that using a strict r5rs program I could
be in the unfortunate position of creating files which could never be
erased.  If it has set! it really ought to have
call-with-output-file! (now there's an idea...).

It seems as though I/O has to be defined in r5rs because of the
interaction with call/cc and other such tricky things, but it
certainly isn't the place for an exhaustive definition of all the I/O
possiblities.

Brian

--

   "There is no right place for the dead to live."

    -- Kai, last of the Brunnen-G



Mon, 29 Dec 2003 11:02:05 GMT  
 why doesn't r5rs define delete-file ?

Michael> Not yet.  It's somewhat harder to do right than it may look at first
Michael> sight.

Brian> Does that me you know of someone working on one ?

No.  I have, however, the material for a filename-abstraction SRFI
lying around that would make a good prerequisite for something like
this.

It might be a good idea to do a POSIX SRFI first and build on that,
possibly starting from Richard Kelsey's recent work in Scheme 48 or
Olin Shivers's work in scsh.

--
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und berhaupt blabla



Mon, 29 Dec 2003 14:52:45 GMT  
 why doesn't r5rs define delete-file ?

Quote:

> Brian> Since the effect of output to file procedures is "unspecified" when
> Brian> the file exists.  In theory this is a big portability gap, because
> Brian> there is no "file-exists?" procedure and no "file-delete" procedure
> Brian> defined.  So now you have to depend on non-standard extensions.

> Brian> So R5RS leaves you stuck with non-portable code.

> Brian> I guess that maybe there is an SRFI lurking here somewhere,
> Brian> isn't there ?

> Not yet.  It's somewhat harder to do right than it may look at first
> sight.

Now that's one way of putting it.

I have recently been suffering with CL's logical pathnames, which in
theory are a way of writing portable code dealing with different
filesystems, whether they be networked or local, and independent of
the OS on which the system is running.

This is fine in theory; in practice, however, each lisp implementation
interprets the standard slightly differently; each filesystem has
slightly broken semantice, meaning that this laudable aim of limited
portability (the actions you can take are necessarily the intersection
of supported actions) isn't even remotely achieved.[1]

It's probably worth taking a look at the CL specification in this area
before sitting down and specifying anything else.

Cheers,

Christophe

[1] Bugs have begun to be fixed in the implementations, though...
--
Jesus College, Cambridge, CB5 8BL                           +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/                  (defun pling-dollar
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)



Mon, 29 Dec 2003 16:40:32 GMT  
 why doesn't r5rs define delete-file ?

Christophe> Now that's one way of putting it.

Christophe> I have recently been suffering with CL's logical
Christophe> pathnames, which in
Christophe> theory are a way of writing portable code dealing with different
Christophe> filesystems, whether they be networked or local, and independent of
Christophe> the OS on which the system is running.

Christophe> It's probably worth taking a look at the CL specification
Christophe> in this area before sitting down and specifying anything else.

Indeed.  Did that.  Then designed something almost completely
different.

--
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und berhaupt blabla



Mon, 29 Dec 2003 21:52:03 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. why doesn't FILE{Prop:label} work?

2. why doesn't this file work

3. MIT scheme doesn't support define-macro ?

4. cgi.py doesn't define a values method for [

5. tclLoadNone.c doesn't define Tclp{L,Unl}oadFile

6. 'file mkdir' doesn't fail

7. #define python-list@python.org '#define'

8. Source'd file wants to use object defined in calling file

9. tkdesk on fedora core 5 -- doesn't run, doesn't compile

10. BLT installs but doesn't work, and TkTable doesn't build

11. Why doesn't everybody use smalltalk?

12. Why doesn't everybody use smalltalk?

 

 
Powered by phpBB® Forum Software