Appender and CTFE

dennis luehring dl.soluz at gmx.net
Fri Mar 4 01:35:53 PST 2011


Am 04.03.2011 09:51, schrieb Kevin Bealer:
> == Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
>>  I see nothing wrong with the occasional forking conditioned by __ctfe.
>>  Even today, code may fork an optimized but nonportable implementation of
>>  some algorithm. The main requirement is that such forks are rare enough
>>  to not cause undue maintenance burden.
>>
>>  Andrei
>
> Regarding maintenance burden, it should be easy to test the correctness of
> such code:
>
> in a unit test:
>
>    enum a = f(...);
>    assert(a == f(...));
>
> Kevin

based on the complexity of the "function" is can be much much more then 
that... and the problem is that "normal" users tend to forget unit-tests...

the _ctfe thing is great because it solves problems in the real world 
still better then before, but it easily opens the door to multi-branch 
development with many different error-szenarios

the question is: is there a way to keep the _ctfe-branching under 
control - i think as long as the ctfe functionality is very near to the 
normal function world it will kept low by nature


More information about the Digitalmars-d mailing list