As of February 2016, Apple’s Swift language has come a long way since its first release. The big news of the end of 2015 is the open sourcing of the language, as it reaches its 2.2 version. This will, on the long run, allow Swift to expand to new platforms and new domains. One of these domains, so far mostly ignored, is Swift as a scripting language.
Curious about how feasible it is as of today to write scripts effectively in Swift, I want to explore the possibilities starting from my Python scripting experience. In that context, two essential workhorses are the Subprocess and ArgParse modules.
As a starting point of investigating Swift as a scripting language, I started with an attempt to reproducing a subset of the features of those Python modules in Swift. You can find Targone (inspired by ArgParse) and Morione (inspired by Subprocess) on GitHub.