dmd 1.053 and 2.037 release
bearophile
bearophileHUGS at lycos.com
Sat Dec 5 07:12:07 PST 2009
There's a large number of changes!
I don't understand what "No more comma operators allowed between [ ]." means.
I have tried the D2 compiler a little with this code:
import std.stdio: writeln;
import std.math: pow;
struct S1 { int x; }
void main() {
struct S2 { int x; }
static struct S3 { int x; }
writeln(S1.sizeof, " ", S2.sizeof, " ", S3.sizeof); // 4 4 4
auto a = [1, 2, 3];
writeln(a); // 1 2 3
a.length++;
//writeln(5 ^^ 2);
writeln(5.2 ^^ 2); // errors
}
S2 seems to not have the hidden field, The sizeof is the same for all three structs.
a.length++ seems to not work yet.
writeln(a); prints stupidly items separated by a space. A MUCH better print is:
[1, 2, 3]
5 ^^ 2 doesn't work yet, I guess it's not implemented yet.
But what do I have to import from math to use 5.2 ^^ 2 ?
Anyway, the need to explicitly import something to use a built-in operator like ^^ looks like a bad idea.
Bye and thank you,
bearophile
More information about the Digitalmars-d-announce
mailing list