[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: a few questions about file-options

This page is part of the web mail archives of SRFI 68 from before July 7th, 2015. The new archives for SRFI 68 contain all messages, not just those from before July 7th, 2015.



On 8/25/05, Michael Sperber <sperber@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> Alex Shinn <alexshinn@xxxxxxxxx> writes:
> 
> > Is there a particular reason FILE-OPTIONS is a macro?
> 
> Yes; to allow future (keyworded) extensions. See Sebastian Egner's
> posts on the matter.

Sebastian Egner didn't even mention the words syntax or macro, he
was concerned with having an external representation for the result
of FILE-OPTIONS.

You can allow future extensions just as easily with a procedure:

  (file-options 'truncate 'ignored-for-now 'exclusive)

So why is this a macro?

> > Should there be a FILE-OPTIONS-DIFFERENCE in addition to
> > FILE-OPTIONS-UNION?
> 
> Maybe.  You want to make a case for it?

Eh, I can't really think of a good use at the moment, and it
could be added later if really needed, so we can leave it out
for now.

> > What happens if we then seek to the begining of the file and write?
> > Does it perform a seek to the end before every write as in POSIX,
> > or on some platforms may this simply start the output at the end
> > of the file?
> 
> Erh, good point, I didn't realize POSIX behaves that way.  What would
> you suggest it should be?

I think on POSIX systems it should definitely use the POSIX mechanism.
The question is for non-POSIX systems do we allow them to just seek to
the end of the file once or do we require them to emulate POSIX (minus
the atomic requirement which would be impossible to do at the user-space
level)?

Anyone using non-POSIX systems have an opinion?

-- 
Alex