Boost logo

Boost :

From: Jason Stewart (res0054p_at_[hidden])
Date: 2002-01-23 16:46:10

I don't think existence testing is a problem. Many times when you get the
value of a variable you want to use a default if it does not exists.
Besides, is it that problematic to check first if you don't want a default?
In my original example:

        string location = env::get("LOCATION", "c:\tmp");

        string location;
        if (!env::get("LOCATION", location))
                location = "c:\tmp";

I think the first example is clearer to read with the small cost being a
separate, explicit check for existence.

I think orthogonalality is good and prefer using separate functions for


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