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

John Cowan cowan at ccil.org
Thu Mar 15 17:12:22 EDT 2007


Per Bothner scripsit:

> 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.

Go with the arbitrary object.  As someone who's had to put up (in two
separate systems) with textual files that can't be indexed by a single
integer (short of Goedel-numbering tricks), I firmly believe such a
cookie should be completely opaque.

-- 
John Cowan    <cowan at ccil.org>     http://www.ccil.org/~cowan
But no living man am I!  You look upon a woman.  Eowyn I am, Eomund's daughter.
You stand between me and my lord and kin.  Begone, if you be not deathless.
For living or dark undead, I will smite you if you touch him.



More information about the r6rs-discuss mailing list