On Thu, 21 Mar 2013 23:37:06 +0100
torhu <[email protected]> wrote:
> 
> You're mixing binary and text mode functions.  read() is binary, 
> stdout.write() is text mode.  And yes, you are asking for newlines to
> be messed with, as File.write is documented to write in text mode.
> 
> But I agree that the docs need improvement.  And maybe the API.

You're missing the point. The point is that the "text mode" is
bug-prone, grossly obsolete, and completely useless and therefore should
absolutely not be the default, *if* it has any reason to even exist at
all.

We could toss a function "output" into Phobos and document it as
being "fubar mode, which converts every third word into 'DERP'", but
obviously just because its behavior matches the description doesn't
justify its existence or its usage of such a generic name. The current
"write" function is every bit as useless as this hypothetical "output"
function, but it's more dangerous because it's harder to notice
you're getting the wrong result.

Reply via email to