There's a bug in scsh 0.4.2 involving the delimited readers.
After I describe it, I would like your opinion on which way to fix it.
The problem is that the documentation claims the default
HANDLE-DELIM argument for READ-DELIMITED and READ-DELIMITED!
is 'peek, but the implementation uses 'trim.
The RECORD-READER procedure uses READ-DELIMITED, and so it also has a related
Now, there are two ways I can fix this:
- Change the documentation to conform with the implementation.
- Change the implementation to conform with the documentation.
My hope is the former. I choose this for two reasons:
- Consistency between file descriptors and ports.
Making the default argument 'trim means that when I later extend
READ-DELIMITED to work on raw file descriptors, the default case will work --
you can't do 'peek functionality with file descriptors; Unix doesn't support
peeking on general file descriptors. If I extended READ-DELIMITED to handle
file descriptors, I'd like them to work with the default args.
- Consistency across procedures.
Right now the defaults for the various procs look like this:
READ-DELIMITED peek (but actually implemented as trim)
If I redefine READ-DELIMITED and READ-DELIMITED! to use default 'trim,
then all the delimited-reader procs will be consistent. Less to think about.
- Will changing READ-DELIMITED's default HANDLE-DELIM argument from 'peek to
'trim break anyone's code? (Probably not, since that's the way it works now.)
- Would you care to lobby for doing it the other way around?