Reading from stdin


#1

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(_:)?


(Chris Lattner) #2

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

-Chris

···

On Feb 7, 2016, at 9:38 PM, Natthan Leong via swift-users <swift-users@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(_:)?