Swift also has an interpreted mode, you can just
#!/usr/bin/evn swift
import Foundation
print("Hello, world")
and chmod +x hello.swift and execute it.Instead of doing swift in bash and calling swiftc, you can always shell out to Process() from inside a Swift script instead.