Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

Change Log: 2.075.0 (upcoming)

previous version: 2.074.0

Download D nightlies
To be released


List of all upcoming bug fixes and enhancements.

Compiler changes

  1. Stack Allocation for Array Literals

    When the '==' operator is used on an array literal and another array, the array literal is placed on the stack. Previous behavior allocated memory on the heap for the array literal.

    In the case of an array literal of structs, the struct dtors are called at the end of full expression, rather than at an unknown moment in time when GC occurs.

    string op;
    
    struct S
    {
        char x = 'x';
        this(this) { op ~= x-0x20; }    // upper case
        ~this()    { op ~= x; }         // lower case
    }
    
    
    assert(op == "");
    {
        S[3] sx = [S('a'), S('b'), S('c')];
    }
    assert(op == "cba");
    

Runtime changes

  1. TypeInfo.init now refers to type property.

    TypeInfo.init used to refer to the method that is now called TypeInfo.initializer. The name change was necessary because the name "init" would clash with the type property of the same name (init). TypeInfo.init now refers to the type property.

Library changes

  1. Added a constant time comparison function for cryptographic hashes

    Added a new function to std.digest.digest.secureEqual that compares two ranges that represent hashes in a secure manner. The comparison is done in constant time regardless of the equality of the two ranges in order to protect against timing attacks. For more information on the attack, please refer to the docs on std.digest.digest.secureEqual.

    ` import std.digest.digest : secureEqual, toHexString; import std.digest.hmac : hmac; import std.digest.sha : SHA1; import std.string : representation;

    void main() { // a typical HMAC data integrity verification auto secret = "A7GZIP6TAQA6OHM7KZ42KB9303CEY0MOV5DD6NTV".representation; auto data = "data".representation;

    string hex1 = data.hmac!SHA1(secret).toHexString; string hex2 = data.hmac!SHA1(secret).toHexString;

    string hex3 = "data1".representation.hmac!SHA1(secret).toHexString;

    assert( secureEqual(hex1, hex2)); assert(!secureEqual(hex1, hex3)); } `


List of all bug fixes and enhancements in D 2.075.0 (upcoming):

DMD Compiler regressions

  1. Bugzilla 16408: [REG2.065] left-to-right order of evaluation of function arguments not consistently followed
  2. Bugzilla 17338: [Reg 2.075] link failure unsupported symbol section 0xff01

DMD Compiler bugs

  1. Bugzilla 15896: private ignored when import bindings are used
  2. Bugzilla 17289: With Xcode 8.3 linker, warnings of "pointer not aligned"
  3. Bugzilla 17335: Function calls in conjunctions do not short circuit when evaluated during compilation
  4. Bugzilla 17337: SIGILL for AVX vector initialization
  5. Bugzilla 17339: ambiguous mangling with const alias argument
  6. Bugzilla 17344: ICE with assignment of post inc-/decremented integral vector

DMD Compiler enhancements

  1. Bugzilla 16600: Wrong error message for ambiguous mutable/immutable constructor

Phobos bugs

  1. Bugzilla 15534: [std.experimental.logger.core] Documentation mismatch
  2. Bugzilla 15763: std.math.approxEqual is not symmetric
  3. Bugzilla 17251: Appender.put errors out with const input range elements
  4. Bugzilla 17270: std.experimental.Final fails on pointers
  5. Bugzilla 17283: std.experimental.typecons uses private module members
  6. Bugzilla 17288: formattedWrite error when width/precision provided and no value to format
  7. Bugzilla 17314: BinaryHeap crashes upon insertion if heapified with an array of length 1

Phobos enhancements

  1. Bugzilla 10001: string formatting with underscores
  2. Bugzilla 17286: A function for comparing two digests securely
  3. Bugzilla 17327: std.getopt: repeated options unrecognised

Druntime bugs

  1. Bugzilla 12233: Attempting to use TypeInfo.init results in a compiler error due to lack of 'this'.

dlang.org bugs

  1. Bugzilla 17303: type error in the href url under the link Systems Programming
previous version: 2.074.0