A safer File.readln

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 25 02:59:00 PST 2017


On Sunday, 22 January 2017 at 21:29:39 UTC, Markus Laker wrote:
> Obviously, we wouldn't want to break compatibility with 
> existing code by demanding a maximum line length at every call 
> site.  Perhaps the default maximum length should change from 
> its current value -- infinity -- to something like 4MiB: longer 
> than lines in most text files, but still affordably small on 
> most modern machines.

An issue I had with low default buffer limits: they are difficult 
to discover and usually start to fail only in production where 
you hit the actual big data, which gets only bigger with time. 
You find and bump one limit, deploy, only hit another later.


More information about the Digitalmars-d mailing list