[Swift-devel] New built-in system, request for comments

Mihael Hategan hategan at mcs.anl.gov
Sat Apr 5 20:47:48 CDT 2014


On Sat, 2014-04-05 at 19:59 -0500, Ketan Maheshwari wrote:
> I agree this might not be needed in most cases. I was thinking of commands
> or external programs that emit both stdout and stderr and say the list of
> files that needs to be mapped are emitted only on one of the streams, in
> such case user might want to ignore the other stream. Exitcode in this
> context is a different issue.
> 
> For instance, user might have a Swift script that produce user written
> trace() on stdout while progress log on stderr. In such case, this might be
> useful:
> 
> file folder[ ] < array_mapper; files = system ("swift genfiles.swift", 1) >;

If we're trying to simulate shell commands, why re-invent the wheel and
not use system("swift genfiles.swift 2>/dev/null")?





More information about the Swift-devel mailing list