std.file.read implementation contest

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 16 17:58:39 PST 2009


Sean Kelly wrote:
> Andrei Alexandrescu wrote:
>>
>> I totally agree. The useful spec of std.file.read should be "reads the 
>> file to exhaustion in a buffer and returns it"
> 
> Okay, that's a fair definition.  So the correct behavior for reading an 
> unbounded stream should be an out of memory error?  This would be 
> entirely reasonable, but any failure conditions should be described as 
> well.

I think that's reasonable and will document it as such. Nice example 
with /dev/random though :o).

Andrei



More information about the Digitalmars-d mailing list