Boost logo

Boost :

Subject: Re: [boost] [boost.process] 0.6 Redesign
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2016-04-19 14:08:35

On 19 Apr 2016 at 13:34, Klemens Morgenstern wrote:

> Because it absolutley requires
> metaprogramming and it is the only elegant choice. On Windows you have a
> function overblown with parameters, making it unreadable. On Posix you
> have to call several functions to get a process up. And my design has a
> variadic function, which allows you to pass only the arguments you need.

A freeform constructor with tagged parameters is absolutely right for
when the parameters can be extended by third party code. Here though
parameter types are completely known, so the appropriate design for
when there are too many parameters and/or you'd like to name them is
to pass a tagged tuple aka a struct.

The choice to use metaprogramming should always confer an absolute
design win over all other design alternatives given the increased
compile times, memory usage, brittleness and other factors.
Metaprogramming is very much not free of cost. It should be used as
sparingly as possible in publicly facing library APIs.

In particular I find Process' use of a freeform constructor
gratuitous given the much simpler close substitutes like passing a

> So would you just design the library like the python equivalent?
> How would you view this library?

Very favourably indeed. I will say I don't think much of his internal
implementation unfortunately, a lot of problems. But the public API
design is the right direction, very intuitive and straightforward to
use. No messing around.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at