[swift-evolution] pitch: Unified libc import (again)
xiaodi.wu at gmail.com
Fri Aug 18 06:17:17 CDT 2017
Not “fundamentally” incompatible:
var stderr = FileHandle.standardError
/* Conform FileHandle to TextOutputStream */
print("foo", to: &stderr)
On Fri, Aug 18, 2017 at 01:39 Brent Royal-Gordon <brent at architechies.com>
> On Aug 17, 2017, at 8:20 PM, Xiaodi Wu via swift-evolution <
> swift-evolution at swift.org> wrote:
> * stderr should go wherever stdin and stdout go. Since it’d be silly for
>> a function like `print(_:separator:terminator:)` or `
>> readLine(strippingNewline:)` to live anywhere but the standard library,
>> then it stands to reason that the stderr version should also live in the
>> standard library.
> FWIW, FileHandle.standardInput, FileHandle.standardError,
> FileHandle.standardOutput, and FileHandle.nullDevice all live in Foundation.
> And, since they're read-only, are fundamentally incompatible with
> `print(…to:)`, which requires its `output` parameter to be passed `inout`.
> Brent Royal-Gordon
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution