Eof - to return or to throw?
Frank Benoit (keinfarbton)
benoit at tionex.removethispart.de
Mon Feb 12 22:21:11 PST 2007
Reaching the eof is not an error, it is the expected behaviour.
An exception shall only be thrown as an "exception", right?
I think, a program shall not go through catch blocks in the normal case.
An exception can lead to a big overhead (gathering data for stack
trace?) or while debugging one might break at the next throw at 4 symbol.
To catch programming errors, ignoring the EOF symbol, we can throw the
Exception if the read function is called again.
More information about the Digitalmars-d
mailing list