Time for Phobos CTFE-ability unittests...right? RIGHT?

bcs bcs at google.com
Tue Jul 12 20:47:42 PDT 2011


== Quote from Nick Sabalausky (a at a.a)'s article
> "bcs" <bcs at example.com> wrote in message
> news:iviv9h$2ee$1 at digitalmars.com...
> > == Quote from Andrej Mitrovic (andrej.mitrovich at gmail.com)'s
article
> >> Last time I brought this issue up in bugzilla it was shot down
with
> >> "We don't guarantee and don't have to guarantee functions will
> > always
> >> be CTFE-able between releases".
> >
> > Maybe there should be a std.ctfe.* that looks a bit like std.*
that IS
> > guaranteed to work. Ideally it would be nothing but a bunch of
alias.
> >
> If we do that we may as well just stick their bodies inside the
original
> function in an if(_ctfe) block.

That only gets a small part of the benefit, the rest is that it would
document to the end user what is CTFE clean and also document to the
dev what functions need to be CTFE clean. Putting if(_ctfe) in the
function ends up making the user look at the code (rather than docs)
and still doesn't give a definitive answer as to if the code works
this time or, given that, if it may break next time around.


More information about the Digitalmars-d mailing list