dmd 1.051 and 2.036 release

bearophile bearophileHUGS at lycos.com
Fri Nov 6 02:48:31 PST 2009


I hope LDC will be able to use this version.

---------------

This function:

auto bar() {
    float[4] a = 0.0;
    return a;
}

May use 4 writes instead of a call to __memset32.

---------------

The limit for array size is large enough:

import std.stdio: writeln;
const int N = 86_312;
auto foo3(int[N] a) {
    a[2] = 5;
    return a;
}
void main() {
    int[N] a2;
    writeln(foo3(a2)[0 .. 10]);
}

---------------

This page may explain how static arrays are passed, because they don't work as C ones now:
http://www.digitalmars.com/d/2.0/abi.html

Regarding the documentation, the page about contract programming:
http://www.digitalmars.com/d/2.0/dbc.html
Points to this page for the Class Invariants:
http://www.digitalmars.com/d/2.0/class.html#Invariant
But there are Struct invariants too, so I think it may be better to talk about Class Invariants and Struct invariants in the dbc.html page.

---------------

It may be positive to have a warning that warns where large fixed-sized arrays are passed by value, to avoid performance problems.

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list