编程语言 D 2.069.0 正式发布,此版本主要改进如下:
编译器改进
库改进
The package std.experimental.allocator was added.
Use isPermutation to test whether two ranges are permutations of each other.
The new isSameLength can be more efficient than comparing the walkLength of two ranges.
getUDAs was added to help get user-defined attributes of specific types from symbols.
getSymbolsByUDA was added to find symbols with specific user-defined attributes.
cmp was added, defining total ordering on floating-point numbers, including NaN.
FreeBSD now also ships with a shared libphobos2.so library (usage info).
更多改进内容请看发行说明。
引用来自“足下存身”的评论
单说语法特性,D2设计的很好,和C#有一拼了,比得上C++14、17了。但是都这么多年了,D2的库还有好多不稳定,还有gc,虽然是可选的,但是很多库是用gc,那项目里面如果不想用,那很多库就不能用了,如果自己重新写,那还不如用C++
选语言不是看语法特性,是看库和生态环境的。有时甚至语法特性少点没关系,像java、go。
go的库一出来就很好用,很实用。这就使得很多时候选择go
但是都这么多年了,D2的库还有好多不稳定,还有gc,虽然是可选的,但是很多库是用gc,那项目里面如果不想用,那很多库就不能用了,如果自己重新写,那还不如用C++
选语言不是看语法特性,是看库和生态环境的。有时甚至语法特性少点没关系,像java、go。
go的库一出来就很好用,很实用。这就使得很多时候选择go