
On Tue, 07 Sep 2010 12:45:27 +0200, Stewart, Robert <Robert.Stewart@sig.com> wrote:
Boris Schaeling wrote:
On Mon, 06 Sep 2010 03:07:26 +0200, Stewart, Robert <Robert.Stewart@sig.com> wrote:
Shall we use a bool to indicate whether an input or output stream is configured or something else like an enumeration? I think it all depends on how many developers want to define new stream behaviors and if it's worth to make the signature a bit more self-explanatory?
bool is never a good idea for such arguments, regardless of the possibility of extending the set.
It smells a bit like over-engineering to me but then I don't really mind to change it. More opinions?
As I noted in the snipped portion of my reply, why would anyone associate true (or false) with input and the other with output? bools are great when a value or argument is, itself, a Boolean quantity, but when they are used to represent non-Boolean quantities, there is no association possible beyond rote memorization.
Besides, removing doubt and adding clarity is hardly over-engineering.
We are focusing here on a bool variable 99% of library users will never see. And I don't think the other 1% will need more than 5 seconds to find out what it does. But as I said I don't mind to change it. And if this is the only issue the library seems to be in a pretty good shape now. ;) I'll update the code and documentation in the coming days. As discussions seem to have calmed down a bit I'll ask then for a review. Thanks for everyone's feedback so far! Boris