
Which code is simpler and more clear?
auto pipe = ls [--arg("reverse") % -arg('l') % "/usr/lib"] | grep ["^d"]; pipe();
or:
Or maybe something like command_line_params ls_params; ls_params.add("--reverse"); ls_params.add("-l"); command_line_params grep_params; grep_params.add("^d"); grep.stdin().connect(ls.stdout()); ls.spawn(ls_params); grep.spawn(grep_params); +- something like that. I'm not telling that Boost.Process's interface is perfect and in fact in the review I noticed that it is not clear and hard to understand. However what you suggest is terribly cryptic. It may be seems to be clear but actually is is very wired construction that hard to understand and would likely lead to very bad error messages. Especially because rm [ "foo.txt" % "bar.txt" ] Would not work... Artyom