Improving assert-printing in DMD
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 2 04:09:23 PDT 2015
On 10/02/2015 02:47 AM, deadalnix wrote:
> ...
> - assert already have a fair amount of magic, notably assert(0) change
> the way control flow works.
Yes, and it is not stellar design. Generally, if it is not possible to
wrap a statement or expression in a function without changing its
semantics, the language provides too much magic and insufficient
abstraction capabilities. (Of course, in practice, there might be
legitimate reasons to deviate from this principle, but less often than
one might think.)
> Having it as an expression is making
> everything very convoluted for no reason.
What is the problem with assert expressions?
More information about the Digitalmars-d
mailing list