Re: [swift-corelibs-dev] Better integration with UNIX tools

2017-11-19 Thread Abhi Beckert via swift-corelibs-dev
> Any ideas on what form it would take? A class method on Process that > returns the output, maybe? I think there are two solutions, and I'd like to see both of them taken. First of all, I disagree with Brent's assessment that we shouldn't have a variant that "simply shells out". Even though this u

[swift-corelibs-dev] Better integration with UNIX tools

2017-11-16 Thread Abhi Beckert via swift-corelibs-dev
Swift is a great shell scripting language except for it's lack of any API to execute UNIX commands. Compare these two shell scripts: > #!/usr/bin/php > > $files = `find ~/Desktop -name *.png`; > > foreach (explode("\n", $files) as $file) { > // do something with $file > } - > #!/usr/bin/swif