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

Re: Positioning



At Wed, 15 Sep 2004 10:00:15 +0200, Hans Oesterholt-Dijkema wrote:

Hi, and welcome to the discussion.

> Would it not be a good idea to add
> 
>   file positioning primitives
> 
> to an implementation for binary i/o.
[...]
> This would make 'record based' i/o possible, with
> seeks to records, etc; and it would be a logical
> next step, because binary i/o provides predefined
> sizes for 'variable types'.

It would indeed be a logical next step from a given view of ports,
however it's distinctly a _next_ step and I would rather a separate
SRFI deal with this, especially as it's already 1 day past the draft
period for SRFI-56.  I had considered this, and binary-typed ports,
and mmaped ports, and univorm vector block reads, but all of these
open a number of issues I'd rather not deal with.  Specifically with
positioning/seeking primitives, apart from interface (POSIX vs. other)
you have to deal with non-seekable ports, and are likely to get into
simultaneous input/output ports.  Scheme still has a long way to go on
its port API - for now it would be nice if, whatever those ports are,
we can read or write a single byte to them.

-- 
Alex