On 2011-07-20 15:37, Don wrote: > Nick Sabalausky wrote: > > Yet again, a new DMD release has broken my code, and other people's code, > > too, just because of Phobos functions loosing their CTFE-ability. > > (strip(), toLower(), etc... And yes, I did bring up the strip() > > regression on the beta list, to no effect.) > > The situation is, that prior to 2.054, use of Phobos in CTFE functions > has not been supported. No official statements have ever been made that > it was supported (and I've tried hard to publicize the fact that it was > not supported). There were some fundamental wrong-code bugs and severe > limitations in CTFE. And so although some Phobos functions seemed to > work in CTFE, most of them were not correct. > So, any Phobos function which used to work in CTFE in some old release > but doesn't any more is not a regression. It was just dumb luck, relying > on undefined behaviour, if any happened to work in a particular release. > > This has changed with 2.054. Although there are still some restrictions > (no classes, many builtin functions aren't implemented), the fundamental > wrong code bugs are fixed. So any Phobos function which works in CTFE in > 2.054, but fails in a future release, can be considered a regression. > We are now in a _completely_ different regime.
If that's the case, then we should look at adding CTFEability tests to at least some portion of Phobos. - Jonathan M Davis