[r6rs-discuss] [Formal] allow port position to be "magic cookie"

From: Per Bothner <per>
Date: Thu Mar 15 03:56:22 2007

---
This message is a formal comment which was submitted to formal-comment_at_r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Type of issue: Enhancement
Priority: Minor
Component: I/O
Version: 5.92
port-position and set-port-position! are specified to get/set the
port's current position as a byte offset.  But there are many kinds
of ports which do have a position, and on which the position can be
changed, but not using a byte offset.  This includes most text ports
(except those implemented using simple stateless transcoders).
In some cases a character offset may make more sense.
Suggestion: For non-binary ports allow the use of any arbitrary
integral "magic cookie" as the position.  One could also allow
an arbitrary value (such as a record), though that reduces the
"typeability" of these procedures.  However, that would allow
a straight-forward wrapping of  C's fgetpos/fsetpos.
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Wed Mar 14 2007 - 16:52:04 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC