3 ms·
Embedded Swift in a script. That seems like a useful concept for small scripts on macOS. I will definitely steal this idea.
by vardump 4mo ago
Embedded Swift in a script. That seems like a useful concept for small scripts on macOS. I will definitely steal this idea.
- thewebguyd 4mo agoSwift 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.
- vardump 3mo agoThanks! I think both approaches have their uses, neither fully replaces the other.