Developers of the programming language d introduced the release of the main reference compiler DMD 2.100.0 which supports GNU/Linux, Windows, MacOS and FreeBSD systems. Compiler code is distributed under the free license BSL (Boost Software License).
The language D uses a static typification, has a syntax similar to C/C ++, and provides the productivity of compiled languages, while borrowing some of the useful capabilities of dynamic languages in the field of development and safety efficiency. For example, support for associative arrays, indirect definition of types, automatic memory management, means of parallel programming, an optional garbage collector, a system of templates, components for metaprogramming, the ability to use libraries in C ++ and Objective-C.
Among changes in the new issue:
- stopped support for the old overload of operators used in the D1 branch. The OPNEG, OPADD_R, OPADDASSIN, etc. Opunary, OPBINARY, OPBINARIGHT and OPOPASSIGN came. The old style of overload of the operators was declared outdated in 2019 and starting with release 2.100 will lead to an error output.
- The support of the keyword of Delete, declared outdated since 2018, has been stopped. Instead of Delete, you should use the Destroy or Core.memory .__ Delete function.
- A new attribute is implemented @mustuse , which can be applied to the types of Struct And Union as an alternative method for processing errors when it is impossible to use exceptions in the code (for example, in @nogc blocks). If the expression marked by the attribute by the attribute is not used in the code, the compiler will make an error.
- For static arrays, the use of “.tupleof” is allowed to obtain a sequence of values ( lvalue ) of each element of the array. VOID FOO (int, int, int) { / * … * /} int [3] IA = [1, 2, 3]; Foo (Ia.tupleof); // analogue FOO (1, 2, 3); Float [3] FA; Fa.tupleof = ia.tupleof; // Simple appropriation FA = IA is given to the Assert error (FA == [1F, 2F, 3F]);