Scripting in Swift: Managing Dependencies | Ray Wenderlich

Enhance the power of your Swift scripts through using 1st and 3rd party dependencies. This screencast will first show you how you can manage your own code via building modules, before moving on to see one way you can use 3rd-party dependencies within your scripts. By the end of the screencast you'll have discovered how you can offer a rich CLI experience through the Commander cocoa pod.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4979-scripting-in-swift-managing-dependencies

“Scripting in Swift” Video is kinda interesting. But is Swift a scripting language? And it is different to implementing a MacOS command line program in XCode ? Are they both same thing ?

Swift isn’t scripting language per-se—in the sense that it is a compiled language, not an interpreted language like most other scripting languages. However, the swift compiler can be used to compile a “swift script” on the fly—at the point of running it.

A macOS command-line app is different in that you write it and compile it. You then have a binary that you can use elsewhere. Running a command line app will be much quicker than a Swift script because it doesn’t have to compile at run time.

Hope that clears it up a little

sam