近些年以来 dlang 版本发布节奏稳健,编译器更新越来越实用,这个版本附带了上下文感知断言消息、较低的 GC 内存使用方式、精确的 GC、对链接自定义 GC 的支持、大量的 Objective-C 混编改进,以及对 DUB 的工具链需求。这次发布也结束了对 OSX-32 的官方支持。
DMD 编译器改进:
- Add support for Objective-C classes
- Add support for Objective-C instance variable
- Add support for Objective-C super calls
- Deprecate Objective-C interfaces
- Context-aware assertion error messages
- Avoid calling the struct constructor from const-casts
- dmd now supports expressive diagnostic error messages with -verrors=context
- memcmp() compares are no longer performed for struct equality tests, memberwise comparisons are done instead, per the spec
- OSX 32-bit is no longer supported
- -preview and -revert command line switches have been introduced
- Transition to C++11 character types
Runtime 运行时改进:
- Added GC.profileStats() to core.memory
- Added core.stdcpp.new_
- Added core.sys.linux.sched.CPU_COUNT.
- Added core.sys.linux.sched.CPU_ISSET.
- Moved std.conv.emplace, std.algorithm.mutation.move, std.algorithm.mutation.moveEmplace, and std.functional.forward to core/lifetime.d
- GC cleanup can now be configured as a DRT GC option
- A garbage collector with precise heap scanning can now be selected
- GC.realloc is now more consistent and robust
- User supplied garbage collectors can now be linked with the runtime
- Added core.stdcpp.allocator
- char/wchar fields in most D runtime (core.* and rt.*) structs are now zero-initialized
包管理器 dub 改进:
- dub fetch now supports <package>@<version> as a shortcut
- extraDependencyFiles attribute added
- File system supplier enabled
- toolchainRequirements recipe entry
Dlang 官方完整的发行细节说明:
https://dlang.org/changelog/2.085.0.html