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

Jonathan M Davis jmdavisProg at gmx.com
Tue Jul 12 16:29:32 PDT 2011


On 2011-07-12 16:17, Andrej Mitrovic wrote:
> I don't understand what strip() could be doing to break CTFE anyway?

Don has been making huge changes to CTFE. Stuff that didn't used to compile, 
now complie. Stuff which compiled but shouldn't have now doesn't compile. 
There's probably stuff which used to compile and should still compile which 
doesn't compile now too. But with all of those changes, I'm not sure that it's 
at all reasonable to expect CTFE-ability to be stable. It should be heading in 
that direction, but I'm not sure how stable Don considers it. Certainly, strip 
could be failing for a perfectly legitimate reason, or it could be a bug. I 
have no idea. But with all of the changes that have been being made to CTFE, 
I'm not at all surprised if stuff has quit working. There's probably more that 
works now that didn't before, but with all of the recent changes, breakage 
doesn't surprise me one bit.

Having tests in Phobos for CTFE would catch many breakages, but if Don isn't 
yet guaranteeing what can and can't be CTFEed by the compiler, then such 
breakages could easily be because of fixes which made it so that stuff which 
wasn't supposed to compiled but did stopped compiling. So, until Don thinks 
that what he's been doing to CTFE is appropriately stable and can make 
guarantees about what will and won't be CTFEable as far as language features 
go, then Phobos can't make any guarantees about CTFEability.

So, basically, a lot of CTFE changes have been happening, and Don has said 
pretty much said that we're not currently making guarantees about what's 
CTFEable and what isn't. And until the changes stabilize and Don is willing to 
make guarantees, Phobos can't guarantee anything about CTFE.

- Jonathan M Davis


More information about the Digitalmars-d mailing list