DMD 1.038 and 2.022 releases

Bill Baxter wbaxter at gmail.com
Sun Dec 14 23:58:23 PST 2008


For me, V1.038 compiles my code but takes a really really really long
time to do so.

It now takes  1 min 20 secs for a full build, when it used to compile
in 13 seconds.
Forget the 60% slowdown from LDC -- this is 515% slower!

(building with DSSS and tango)

--bb

On Mon, Dec 15, 2008 at 10:14 AM, bearophile <bearophileHUGS at lycos.com> wrote:
> This time the compilation of my dlibs (using V.1.038) has gone a little less smoothly.
>
> With V.1.037 this line compiles fine, while statically asserts in V.1.038:
> static assert(!is(typeof( xkeys([12:"ab", 5:"ba"]) )));
>
> I have tried to track down the problem, but after going into a rat's nest for 40-50+ minutes I have surrendered and just commented out the line.
>
> That line of code is present inside the unittests of xkeys(), an iterable class whose opApply yields just the keys of the given associative array. Of course that [12:"ab", 5:"ba"] AA can't be accepted because its values aren't dynamic arrays, so it can't use a foreach on it yet.
>
> -----------------------
>
> I have seen the Bug #493 fixed, very nice. Of course the more I have the more I want, so I'd like to be able to do something like this:
>
> import std.stdio: writefln;
>
> struct Spam(T, S) {
>    T a;
>    S b;
>    void show() {
>        writefln("typeof(T), typeof(S): ", typeid(T), " ", typeid(S));
>    }
> }
>
> Spam!(T, S) spam(T, S)(T a, S b) {
>    return Spam!(double, int)(a, b);
> }
>
> void main() {
>    Spam!(double, int)(1.0, 33).show(); // OK
>    spam(1.0, 33).show(); // OK
>    Spam(1.0, 33).show(); // ERROR
> }
>
> Currently I use an auxiliary function (here named spam()) to do this with structs (and classes).
> It's just sugar, but may help me avoid about 20-30 little helper functions in my dlibs.
>
> Bye,
> bearophile
>


More information about the Digitalmars-d-announce mailing list