[swift-evolution] Proposal: console input reader/handler in swift

Alexander Kempgen alex at kempgen.de
Fri Dec 25 10:42:32 CST 2015

Hi Sergo,

isn't that what the function readLine(stripNewline:) in the standard library does?


Alexander Kempgen
alex at kempgen.de

> Am 25.12.2015 um 17:09 schrieb Sergo Beruashvili via swift-evolution <swift-evolution at swift.org>:
> Hello,
> As you know lots of online coding challenge websites or University websites require to read data from console ( standard input ).
> To read from console in Swift, you could use C "scanf" or "NSFileHandle.fileHandleWithStandardInput()". but I found them very Time and Code consuming. If you check the language popularity in these systems , most of them have simple functions to read from console ( C++ cin/cout , Java Scanner, Python raw_input ...etc ) . It is especially helpful when you have limited time. And it is not only the coding challenge websites, since Swift got open-source there will be lots of command line tools implemented in Swift.
> I`d suggest to create very simple functionality to manage console input/output , it would make Swift language popular for solving online coding challenges and for command line tools.
> Regards,
> Sergo
>  _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151225/54c2e581/attachment.html>

More information about the swift-evolution mailing list