[swift-evolution] Reading from Standard In

Kyle Bashour kylebshr+swift-evolution at gmail.com
Sun Dec 6 23:19:33 CST 2015


Hi Everyone,

I hope this is the best place to discuss this — if not, please point me in
the right direction! It seems like an appropriate topic for evolution
though.

According to my limited knowledge and basic research, Swift doesn't
currently have a simple way to read from standard input from the console.
The best solution I found was this StackOverflow solution
<http://stackoverflow.com/questions/24046952/xcode-6-swift-read-standard-input-console-to-string>,
but it doesn't seem to be implemented on Linux yet, and I think it should
be simpler than having to use NSFileHandle if Swift is to be used as a true
systems programming language.

Of course, if there is an easier way to do this, please let me know! Or a
reason why the SO solution is the best way to do this. Thanks for reading,
would love to hear thoughts on this. I also just joined the list, so if
this has already been discussed, apologies.

-- Kyle Bashour

@kylebshr
kylebashour.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151207/5bd40e03/attachment.html>


More information about the swift-evolution mailing list