Boost logo

Boost :

Subject: Re: [boost] [boost.process] 0.6 Redesign
From: Klemens Morgenstern (klemens.morgenstern_at_[hidden])
Date: 2016-04-19 16:35:28


> Why do you try to get away from the API Boost.Process V0.5 provides in the
> first place? Do you have a rationale for this?
> I found that API to be very nice, concise, easily extensible (even by the
> user), and to be trivial for trivial use cases. All of which are signs of a
> good API design.

I still do not really get what Niall would like to have, but it seems to
be completely different from what boost.process 0.5 or my 0.6 version are.

Concerning the interface changes, I did what I would consider
simplifications for the user. I.e. you do not have to name every
initializers explicitly and they are more treated as properties, i.e.
you can write the following:

//0.5
std::vector<std::string> args = {"--version"};
execute(set_exe("gcc.exe"), set_args(args));

//0.6
execute(exe="gcc.exe", args={"--version"});
execute("gcc.exe", "--version");//exe-args style
execute("gcc.exe --version"); //cmd-style

I consider that an improvement of the current interface, not a major
change. And that is as trivial as it gets.

And it is still extendable, and easier so since on_success, on_error and
on_setup are now consistent across posix and windows. But that's not
entirely finished as of yet.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk