[plt-scheme] no #!eof

From: Neil Van Dyke (neil at neilvandyke.org)
Date: Tue Apr 15 01:49:39 EDT 2008

I think the REPL giving supporting "segments" like that is something 
that you would not see if reading from Unix/Posix input streams, from 
string ports, or from any other other Scheme input port I can think of.

Do you see these "segments" supported by any input other than the REPL?

If so, do you see a need to distinguish end-of-segment value from a 
end-of-all-segments value?  Or is there ever an end-of-all-segments, or 
just an infinite sequence of empty segments?

(By the way, I *have* seen precedent for something like these 
"segments", in certain old magnetic tape systems.  The OS vendors 
officially supported multiple 'end-of-tape' markers on a tape.  I think 
the misnomer of 'end-of-tape' hints that the feature of multiple 
end-of-tape marks was added somewhat kludgily in that case.)

Abdulaziz Ghuloum wrote at 04/15/2008 12:55 AM:
> On Apr 15, 2008, at 12:18 AM, Andrew Reilly wrote:
>> Ew! Yuck!  If you do that, then in what sense is it a marker of the end
>> of the file?  And if it isn't the marker of the end of the file, what 
>> use
>> is it at all?
> Have you never seen an eof midstream?  Well, I haven't invented the 
> concept. :-)
> Watch:
> Welcome to MzScheme v3.99.0.18 [3m], Copyright (c) 2004-2008 PLT 
> Scheme Inc.
> > (list (read) (read) (read) (read))
> ^D
> 12
> ^D
> 13
> (#<eof> 12 #<eof> 13)
> An eof marks the end of one segment in an input stream.  Reading again 
> gets you to the next segment, and so on.  So, this behavior makes 
> reading #!eof in a stream consistent with reading a ^D in stream:

Posted on the users mailing list.