Oleg Kobchenko wrote:
> It's a great idea to include line reading
> into a standard library. Here is a few comments.
> 
> There are two differences from the original
> readlines:
>  - overlapped reading (not once and only once)
>    (with asserting presence of LF in current block)
>  - automatic removal of terminators

Agreed on leaving in the LF, in fapplylines. Do you agree on removing
the CR or think this should be left in as well?

I am in two minds on the buffer. It does impact performance, though not
by much. But it means that after the block of 1e6 bytes is read in, it
is immediately copied because it is appended to the tail of the previous
block. So the question is whether this performance hit is worthwhile to
permit the code to be used for stdin or sockets. I don't feel strongly
on this and wonder if there are other opinions on it.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to