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

Re: call-with-input-file



Quoting MichaelL@frogware.com:
> This may be as intended, but in case it's not: with-input-from-file 
> restores the old input port, but call-with-input-file doesn't. It seems 
> like they both should. (I've looked at the source, so I understand why 
> it's happening; I'm just asking whether or not the two really should 
> behave differently.)

Arguably, `with-input-from-file' shouldn't restore the current input
port on exit unless it's replacing the one put there by
`with-input-from-file' on entry. But it currently behaves in a way
that's consistent with `parameterize' expressions in general, so I'm
inclined to leave it as-in.

In any case, the current behavior should be better documented.

Matthew