[plt-scheme] no #!eof

From: Dave Herman (dherman at ccs.neu.edu)
Date: Sun Apr 13 15:58:37 EDT 2008

IIRC, #!eof ended up not being mandated by R6, but I'm curious why it 
isn't supported in v4.

I think it'd be convenient for things like:

     (case (read-char port)
       [(#\,) (parse-more-items port)]
       [(#\]) '()]
       [#!eof (error 'parser "unexpected EOF")])

whereas otherwise you have to split the conditional out into three levels:

     (let ([ch (read-char port)])
       (if (eof-object? ch)
           (error 'parse "unexpected EOF")
           (case ch

I imagine there's a good reason I haven't thought of why #!eof is a bad 
idea, but I thought I'd ask in case it's an oversight.


Posted on the users mailing list.