D 语言现在的更新频路非常稳定,3 年内没两个月发布一个大版本进行特性更新,此次发布的 2.087.0 附带 22 个主要改进和 44 个Bugzilla问题修复,其中最值得关注的是 DIP1000 特性,已经规划了很多年终于现在可以启用预览,可在编译的时候加入 -preview=dip1000 进行体验。
编译器改进
- A new syntax is available to declare an alias to a function type
- Add Markdown-inspired features to Ddoc
- scope as a type constraint on class declarations is deprecated.
- Usage of this and super as types is obsolete
- Turn deprecation into error for some invalid integer literals.
- fix Issue 16002 – Add is(sym == module) and is(sym == package)
- Local templates can now receive local symbols.
- Windows: The mingw based runtime and platform import libraries can now be selected explicitly
- Floating point types now use a quiet nan as the .init value
- Class allocators and deallocators are now obsolete
- The deprecation phase for access checks is finished
- Initialization of immutable global data from static this is deprecated
- Struct constructors with all-default parameter will now error
- Template alias parameters now match basic types as a conversion.
- 32 Bit Linux now uses XMM registers for float and double rather than the x87.
运行时改进
标准库改进
- Added a table of control characters in ASCII table
- Count processors via sched_getaffinity on Linux
- Add overload std.algorithm.sorting.schwartzSort!(alias transform, SwapStrategy ss, R)
- Phobos is now compiled with -preview=dip1000
D 语言近年来的发展比较迅速,在各平台编译器的支持中可以看到 gcc 已经默认包含 gdc 进行 D 语言编译,基于 LLVM 架构的 LDC 也稳健跟进中,而在著名 linux 发行版 Fedora 的安装镜像中也包含 D 语言开发环境的选择,不难看出 D 语言近些年的努力得到了开源社区的认可。
而在服务端领域 HuntLabs 也提供了很多服务端架构工具链,包含底层 io、并发、数据库、分布式缓存、http2 协议等,也包含 gRPC、hunt-framework、hunt-service、hunt-entity 框架方便进行微服务构建。
希望 DLang 在服务端领域能够成为 Java、Golang、PHP 之外的另一个好的选择,我们相信好的技术不应该被埋没,加油 D。