# Should Read[] not close its Stream? [closed]

I read a record from a file.

Read[file,Record];


It reads and opens a stream.

Should Read not close its stream after reading, like ReadList does?

ReadList[file,Record,1];

-
ReadList reads the whole content of a file, so it makes sense to close it afterwards, while Read only reads the next entry in the file (be it a number, line, record, whatever). This is by design. –  István Zachar Apr 8 at 14:08
Also note that ReadList only closes the stream afterwards if it was closed to begin with. I think you should regard the ReadList auto-closing behaviour as a convenient shortcut rather than "the way it should be". –  Simon Woods Apr 8 at 14:33