On Fri, Feb 25, 2011 at 05:34:19PM -0000, Parrot wrote:
>  The approach of providing a dumb eof for FileHandle and letting users
>  build on top of it makes sense to me and seems preferable to trying to
>  dtrt while avoid unexpected costs and side-effects.  
> [...]

Just wanted to add a "me too" to this -- in the general case I don't
think it's possible to detect that you've reached the end of file
until you actually try to read beyond it.  And many handles are
really streams where the length _can't_ be known until an attempt
is made to read from the handle and there's nothing more to read.

I'd much rather have a .eof that works consistently across handles
than one that tries to be smart about it in certain (albeit
common) cases.  And the traditional interpretation of "eof" in
most languages I've dealt with has been that it occurs _after_ a
read has failed.

I strongly recommend that the current behavior is the "correct" 
one for Parrot and that we should reject this ticket.

Pm
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to