Time for Phobos CTFE-ability unittests...right? RIGHT?
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jul 13 15:06:32 PDT 2011
On 2011-07-13 13:58, filgood wrote:
> Jonathan,
>
> Given that D2 is now the main version, would it not be possible - maybe
> in the future - if big changes like the CTFE work by Don are planned to
> bring to do this in a 2.1 release of D (and once stable bump to a 2.2
> release or so)... While the big changes happen in 2.1, the 2 releases
> would only hold bug fixes?
D versioning doesn't work that way. Currently, we have 1.069 for D1 and 2.054
for D2. The next version of D2 will be 2.055. I don't know exactly what
Walter's plans are, but it looks to me like the idea is that 2.100 will follow
2.099. But regardless, D is still in development, and CTFE happens to be one
one of its less stable elements. A lot of work is being done on it, and it
will probably stabilize relatively soon, but until it does, I don't expect
that we'll be making any guarantees about what will or won't be CTFEable.
Certainly, Don has been opposed to such suggestions thus far. I hope that once
it's more stable, we'll be able to have unit tests in Phobos to guarantee that
at least some set of functions stay CTFEable if they're already CTFEable, but
we're just not going to make any such guarantees before CTFE is more stable.
Not to mention, while most stuff in D is relatively stable, and the language
spec really shouldn't be changing much - if at all - at this point, both the
compiler and libraries are still under heavy development. Breaking changes
should be rare, but they do happen. And newer and/or fancier features are the
ones which are most likely to break. CTFE happens to be one of them. There are
a couple of others (alias this and inout) which aren't even completely
implemented yet. So, it's questionable if talking about D2 as if it were
stable is a good idea. It's getting close. IIRC, in a recent discussion on it,
Don thought that it would reach that point before the end of the year, but
some features just aren't yet stable enough to be guaranteed to continue to
work exactly as they do now. Fortunately, that list should be rather short.
But CTFE is on it.
So, we're not going to fork D2 at this point and have a 2.0 which only has bug
fixes and 2.1 which has new features. We're fast approaching the point where
what we have will be stable and there shouldn't be any big breaking changes
(big breaking changes are actually pretty rare as it is at this point), but
we're not going to effectively fork development to provide a more stable
branch for a feature for which we're not yet giving guarantees about its
stability.
I _do_ think that having unit tests in Phobos for CTFEability is a good idea,
but until Don says that CTFE is stable enough for that, we're not going to do
it. I believe that he's on vacation at the moment (which is presumably why he
hasn't said anything on this thread), and maybe he can be persuaded once he's
back, but the last time that he had anything to say about it, he was against
the idea.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list