Skip to content

Swift

"Swift is a powerful and intuitive programming language for macOS, iOS, watchOS and tvOS. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and Swift includes modern features developers love. Swift code is safe by design, yet also produces software that runs lightning-fast."

Examples

Interpreted swift scripts

You can write swift scripts similar to how you would write scripts for any other interpreted language:

#!/usr/bin/swift

// Demo of an interpreted swift script

print("Hello world!")