Change Log: 2.073.0 - D Programming Language
Description: D Programming Language
Keywords: D programming language

Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
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.073.0

Download D 2.073.0
released Jan 22, 2017

#### Compiler changes

1. New command line option -mscrtlib=libname for Windows MS-COFF object files.
2. The builtin Ddoc theme has been overhauled.

#### Library changes

1. Added std.traits.Promoted to get the result of scalar type promotion in multi-term arithmetic expressions
2. Added std.algorithm.searching.maxIndex to get the index of the maximum element of a range.
3. Added std.meta.staticIsSorted to check if an AliasSeq is sorted according to some template predicate.
4. Added std.algorithm.searching.minIndex to get the index of the minimum element of a range.
5. std.traits.hasFunctionAttributes has been added
6. std.experimental.ndslice has been deprecated.

#### Language changes

1. Add D_AVX predefined version when -mcpu=avx is used.

List of all bug fixes and enhancements in D 2.073.0.

#### Compiler changes

1. New command line option -mscrtlib=libname for Windows MS-COFF object files.

   If building MS-COFF object files with -m64 or -m32mscoff, this option specifies the reference to the C runtime library libname that is embedded into the object file containing main, DllMain or WinMain for automatic linking. The default is libcmt (release version with static linkage), the other usual alternatives are libcmtd, msvcrt and msvcrtd. If libname is empty, no C runtime library is automatically linked in.

2. The builtin Ddoc theme has been overhauled.

   Dmd will now use more modern looking theme for generated documentation, also see dmd#6173.

#### Library changes

1. Added std.traits.Promoted to get the result of scalar type promotion in multi-term arithmetic expressions

   std.traits.Promoted gets the type to which a scalar type will be promoted in multi-term arithmetic expressions

       import std.traits : Promoted;
       static assert(is(typeof(ubyte(3) * ubyte(5)) == Promoted!ubyte));
       static assert(is(Promoted!ubyte == int));

   See the D specification on scalar type promotions for more information.

2. Added std.algorithm.searching.maxIndex to get the index of the maximum element of a range.

   std.algorithm.searching.maxIndex gets the index of the maximum element of a range, according to a specified predicate. The default predicate is "a > b".

       import std.algorithm.searching : maxIndex;
       int[] a = [5, 4, 2, 1, 9, 10];
       assert(a.maxIndex == 5);

       int[] a;
       assert(a.maxIndex == -1);

3. Added std.meta.staticIsSorted to check if an AliasSeq is sorted according to some template predicate.

   std.meta.staticIsSorted checks whether an AliasSeq is sorted according to some template predicate.

       enum Comp(T1, T2) = T1.sizeof < T2.sizeof;

       import std.meta : staticIsSorted;
       static assert( staticIsSorted!(Comp, byte, uint, double));
       static assert(!staticIsSorted!(Comp, bool, long, dchar));

   Additionally, the compile-time performance of std.meta.staticSort has been greatly improved. Nevertheless, due to compiler limitations it is still an extraordinarily expensive operation to perform on longer sequences; strive to minimize such use.

4. Added std.algorithm.searching.minIndex to get the index of the minimum element of a range.

   std.algorithm.searching.minIndex gets the index of the minimum element of a range, according to a specified predicate. The default predicate is "a < b".

       import std.algorithm.searching : minIndex;
       int[] a = [5, 4, 2, 1, 9, 10];
       assert(a.minIndex == 3);

       int[] a;
       assert(a.minIndex == -1);

5. std.traits.hasFunctionAttributes has been added

   It exposes a user-friendly way to query for function attributes:

       import std.traits : hasFunctionAttributes;

       // manually annotated function
       real func(real x) pure nothrow @safe
       {
           return x;
       }
       static assert(hasFunctionAttributes!(func, "@safe", "pure"));
       static assert(!hasFunctionAttributes!(func, "@trusted"));

       // for templated function types are automatically inferred
       bool myFunc(T)(T b)
       {
           return !b;
       }
       static assert(hasFunctionAttributes!(myFunc!bool, "@safe", "pure", "@nogc", "nothrow"));
       static assert(!hasFunctionAttributes!(myFunc!bool, "shared"));

6. std.experimental.ndslice has been deprecated.

   The synchronization between Phobos and Mir turned out to be a lot of work with litte gain. Users of std.experimental.ndslice are advised to switch to the upstream mir package.

#### Language changes

1. Add D_AVX predefined version when -mcpu=avx is used.

List of all bug fixes and enhancements in D 2.073.0:

#### DMD Compiler regressions

1. Bugzilla 16102: [REG2.070] struct dtor replace value on stack
2. Bugzilla 16278: [REG2.067] undefined reference when class template is instantiated only in 'is' expression
3. Bugzilla 16574: [REG 2.072.0-b1] Unexplained errors about functions that overridde anything
4. Bugzilla 16598: [REG2.069] ICE with void ternary + finalizers
5. Bugzilla 16678: [REG] Fix for issue 16193 creates major breakage
6. Bugzilla 16699: [REG 2.070] stack corruption with scope(exit)
7. Bugzilla 16747: [Reg 2.072] Cannot have stack allocated classes in @safe code
8. Bugzilla 16980: [REG2.072.0] wrong interface called
9. Bugzilla 17029: [Reg 2.072] scope variable may not be returned
10. Bugzilla 17059: [REG 2.072.2] incorrect circular reference with is(Klass : Interface)
11. Bugzilla 17072: [REG 2.073.0-b1] missing symbols with -inline
12. Bugzilla 17073: [Reg 2.071.0] Priority clash with void default initialization of struct fields
13. Bugzilla 17074: extern(C++, keyword) crashes compiler
14. Bugzilla 17087: [REG2.072] Wrong generated with cfloat and creal when casting from int

#### DMD Compiler bugs

1. Bugzilla 922: export keyword causes undefined references on linux
2. Bugzilla 1761: TypeInfo.toString for function types always indicates no-parameter function
3. Bugzilla 5995: string append negative integer causes segfault
4. Bugzilla 8838: Slicing static arrays should be considered unsafe (@system)
5. Bugzilla 10447: Refused increment of double2 with a immutable(double2)
6. Bugzilla 11118: undefined identifier in template structs functions
7. Bugzilla 11961: Can't select CRT to link against
8. Bugzilla 12430: non compile-time __simd opcode causes ICE
9. Bugzilla 13927: optimizer hangs in optelem with SIMD initialization
10. Bugzilla 14238: DIP25: escape checks can be circumvented with delegate
11. Bugzilla 14613: DMD: Internal error: backend/cod1.c 1567 on '-O' switch
12. Bugzilla 15544: Escaping fields to a heap delegate must be disallowed in @safe code
13. Bugzilla 15576: extern(C++, namespace) wrong mangling of variables (Windows)
14. Bugzilla 15862: Functions that return types with mutable indirections should be weakly pure, not strongly pure
15. Bugzilla 15989: Initializing manifest constants with CTFE allocated data
16. Bugzilla 16116: Infinite loop on (somewhat complex) simd math
17. Bugzilla 16146: postblit is not called on struct creation with "{field:value}" syntax
18. Bugzilla 16381: Wrapping a float4 array leads to segfault.
19. Bugzilla 16488: [spec][optimization] broadcast scalar to simd vector
20. Bugzilla 16499: Misleading error message for 'in' operator with wrong argument
21. Bugzilla 16523: [ICE] Internal error: backend/symbol.c 1031
22. Bugzilla 16589: Taking address of stack variables in @safe code is allowed in some cases
23. Bugzilla 16679: prefetch on old pentium d results in an illegal instruction
24. Bugzilla 16743: Intrinsic recognition sometimes fails if a software implementation is available
25. Bugzilla 16854: Inline assembler has VMOVLHPS and VMOVHLPS swapped
26. Bugzilla 16967: No switch case fallthrough warnings in in/out contracts
27. Bugzilla 16977: bad debug info for function default arguments
28. Bugzilla 17034: DMD 32 bit PIC wrong code

#### DMD Compiler enhancements

1. Bugzilla 768: A switch to print predefined version identifiers
2. Bugzilla 13474: Discard excess precision for float and double (x87)
3. Bugzilla 16449: add support for RDTSCP in iasm
4. Bugzilla 16558: [Mir] Generic unaligned load/store like (like LDC loadUnaligned and storeUnaligned)
5. Bugzilla 16560: [Mir] Prefetch intrinsics like in LDC
6. Bugzilla 16703: Support indexing of SIMD vector types
7. Bugzilla 16798: Extend -Ipath switch to -Imodule=path so path heirarchy doesn't have to match package heirarchy
8. Bugzilla 16958: replace -mavx switch with -mcpu=id

#### Phobos regressions

1. Bugzilla 16609: std.experimental.ndslice.slice issues warnings when building Phobos
2. Bugzilla 16661: [REG2.072] std/format.d(1070): Incorrect format specifier: .2f for wstring and dstring
3. Bugzilla 16663: [REG 2.072] std.unit.toUpper rejects an alias this to a string
4. Bugzilla 16667: [REG] dub test fails on std.conv after upgrade to dmd 2.072.0
5. Bugzilla 16682: [REG 2.072] "privatization" of symbols in std.stdio breaks DFMT
6. Bugzilla 17066: [REG2.073a] std.regex captures got immutable

#### Phobos bugs

1. Bugzilla 6716: Linking a C program with D library causes DEH errors
2. Bugzilla 8087: Improve clarity of std.algorithm documentation
3. Bugzilla 9378: std.internal.digest.sha_SSE3 breaks if compiled with PIC
4. Bugzilla 9391: Constant std.regex.regex
5. Bugzilla 13314: BinaryHeap assumes Store has dup property
6. Bugzilla 16048: std.getopt: duplicated options are not detected
7. Bugzilla 16135: missing std.format import in std.algorithm.comparison
8. Bugzilla 16255: std.algorithm.iteration.each on opApply doesn't support ref
9. Bugzilla 16352: dead-lock in std.allocator.free_list unittest
10. Bugzilla 16419: issue with ndslice.slice toHash
11. Bugzilla 16478: Don't allow to!T() in constraint
12. Bugzilla 16588: uniq's BidirectionalRange behavior is inconsistent with its InputRange behavior
13. Bugzilla 16611: std.traits.fullyQualifiedName fails with error 'Unrecognized type const(void)'
14. Bugzilla 16624: std.path.setExtension ddoc comment is strangely formated
15. Bugzilla 16634: std.math exposes yl2x and yl2xp1 publicly
16. Bugzilla 16653: ParameterDefaultValueTuple fails to compile when function has lazy param
17. Bugzilla 16724: RandomCover.popFront is a no-op for the first call
18. Bugzilla 16758: Variant.opIndex result not modified after opAssign
19. Bugzilla 16794: dmd not working on Ubuntu 16.10 because of default PIE linking
20. Bugzilla 16955: std.process.spawnProcessImpl can crash due to alloca
21. Bugzilla 16959: bringToFront fails on char arrays
22. Bugzilla 16970: Fix deprecations and warnings when compiling Phobos
23. Bugzilla 16996: std.algorithm.remove with SwapStrategy.unstable removes more entries

#### Phobos enhancements

1. Bugzilla 4125: std.numeric.gcd can use a binary GCD
2. Bugzilla 16249: std.signals: disconnect() is unsafe during emit()
3. Bugzilla 16571: Unittests should not list /tmp/ recursively
4. Bugzilla 16628: Special case std.algorithm.equal for known empty or infinite ranges

#### Druntime regressions

1. Bugzilla 16974: [REG2.068] Equal associative arrays with associative array keys are considered unequal

#### Druntime bugs

1. Bugzilla 16651: atomicOp!"-="(ulong, uint) = wrong result/codegen
2. Bugzilla 16654: hashOf returns different hashes for the same string value
3. Bugzilla 16764: hashOf is misleading, error-prone, and useless

#### Druntime enhancements

1. Bugzilla 16797: Zero clock resolution lead to division by zero

#### dlang.org bugs

1. Bugzilla 16592: Building dlang.org does not work without a preexisting dmd installation
2. Bugzilla 16948: broken links in std.stdio due to inccorrect use of WEB macro

#### dlang.org enhancements

1. Bugzilla 8799: Give example of Tuple mapped to a function
2. Bugzilla 16147: Provide shiny 404 error pages

#### Tools regressions

1. Bugzilla 14296: RDMD fails at building a lib when the source is in a subdir
2. Bugzilla 16962: rdmd --build-only --force -c main.d fails: ./main: No such file or directory
3. Bugzilla 16978: [REG2.072.0] pragma(lib) is broken with rdmd

#### Tools bugs

1. Bugzilla 16966: rdmd: AssertError@rdmd.d(489): should have been created by compileRootAndGetDeps

#### Tools enhancements

1. Bugzilla 16593: Building "tools" produces deprecation warnings

Copyright © 1999-2019 by the D Language Foundation | Page generated by Ddoc on Sat Jun 15 14:48:20 2019