[dmd-beta] Fighting with 2.059 and not quite winning

Jonathan M Davis jmdavisProg at gmx.com
Fri Apr 6 22:17:40 PDT 2012


On Friday, April 06, 2012 21:04:57 Jonathan M Davis wrote:
> I don't know that this issue would hold up the release, but I'll try and
> take a stab at the purity issues in to!string this weekend and see how
> close we are to make that work. If we're close, it may be possible and
> reasonable to get it into the next release, but if there are a bunch of
> changes required, then probably not. It _does_ not get done relatively soon
> though (and probably by 2.060, because we're probably going to work on
> toString in Object being const correct with that release).

It looks like at minimum, Appender would have to be usable in pure functions, 
and that's a tough one. For starters, https://github.com/D-Programming-
Language/druntime/pull/154 would probably have to be sorted out and merged in 
(to make reserve and capacity pure), but that's just the beginning. I'll 
probably have to take the time to make sure that all of the issues wth making 
Appender pure and to!string are found and sorted out, but that's not 
necessarily going to be a quick process, since the problem is definitely a bit 
of onion. You fix one layer only to have to fix the next one and the next one. 
It will likely take time, and I don't think that Walter is looking to delay 
the release all that much.

If this is really that big an issue in general, then it would probably be 
better to temporarily make it so that toHash doesn't insist an being pure 
until 2.060, but I don't know. As much as you shouldn't have to suffer because 
of this (it _should_ work), I suspect that having toHash and toString share 
code isn't all that common (though I could be wrong).

- Jonathan M Davis


More information about the dmd-beta mailing list