DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky
Atila Neves via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Wed Jun 11 11:03:04 PDT 2014
On Tuesday, 10 June 2014 at 19:36:57 UTC, bearophile wrote:
> At about 40.42 in the "Thoughts on static regex" there is
> written "even compile-time printf would be awesome". There is a
> patch about __ctWrite in GitHug, it should be fixed and merged.
>
> Bye,
> bearophile
I wish I'd taken the mic at the end, and 2 days later Adam D.
Ruppe said what I was thinking of saying: unit test and debug the
CTFE function at runtime and then use it at compile-time when
it's ready for production.
Yes, Dmitry brought up compiler bugs. But if you write a
compile-time UT and it fails, you'll know it wasn't because of
your own code because the run-time ones still pass.
Maybe there's still a place for something more than pragma msg,
but I'd definitely advocate for the above at least in the
beginning. If anything, easier ways to write compile-time UTs
would be, to me, preferable to a compile-time printf.
Atila
More information about the Digitalmars-d-announce
mailing list