[swift-users] Reading from stdin

Chris Lattner clattner at apple.com
Mon Feb 8 11:49:20 CST 2016


> On Feb 7, 2016, at 9:38 PM, Natthan Leong via swift-users <swift-users at swift.org> wrote:
> 
> Hi there,
> 
> Coming from C++ with std::cin, why isn’t the reading of stdin for Swift a function as easy swift-y as print(_:)?

The Swift standard library does provide readLine(), which is the analog for print.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160208/802dc13f/attachment.html>


More information about the swift-users mailing list