Use swift as a scripting language without the slow start time:
Swift Caching Compiler - https://github.com/jrz/tools
Swift Caching Compiler - https://github.com/jrz/tools
Nice catch.
edit: you are right. The binary version will result in a different argv[0]. Not sure what'd the best solution would be. Hardcoding doesn't make sense, as symlinks also change argv[0], so overriding is not the way to go.