|
Boost : |
Subject: Re: [boost] [assert] static_assert envy
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2011-01-18 13:51:26
Den 18-01-2011 18:20, Steven Watanabe skrev:
> AMDG
> What exactly is wrong with
> BOOST_ASSERT( !foo() || assertion )
> or
> BOOST_ASSERT( foo() ? assertion : true )
>
> IMHO, the last thing we need is lots of
> minor variations that don't add any
> real utility.
I beg to differ. Code needs to be clear and meaningful to read,
and the obscure rewrite rule makes the code harder to write and read.
Simplifying logic is one of the best ways to simplify code and ensure it
is correct.
What is clear to experts might not be so clear to those of us that are
mentally challenged when facing cryptic logic. As programmers we have
enough other things to worry about.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk