2 ms·
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.
by thewebguyd 4mo ago
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.
- vardump 4mo agoThanks! I think both approaches have their uses, neither fully replaces the other.