D语言/DLang 2.088.0 发布,增强与 C++ 交互操作

来源: 投稿
作者: zoujiaqing
2019-10-15 14:09:00

D 语言近些年一直在加紧脚步的开发迭代,改进语言本身的特性,增强易用性和其他语言的互通性,前面几个版本主要是针对 macOS 平台的 Objective-C 进行打通交互性,而一直努力的还有 C++ 标准库的打通,本次版本也对 C++ 的 std::string 和 std::vector 进行打通,进一步改善语言之间的交互性。

DLang 2.088.0 这个版本包含 27 个主要更改和 58 个已修复的Bugzilla问题。非常感谢 58 位贡献者使 2.088.0 成为可能。

编译器的变化

  1. D1 operator overloads have been deprecated.
  2. Deprecate allowing a constructor declaration in a static block
  3. deprecated now applies to alias this as well
  4. Double initialization of immutable fields inside constructor is now obsolete
  5. add __traits(getLocation, symbol)
  6. Suppress the "read-modify-write" error if type is a struct or a class
  7. Postblit and destructors are no longer called on members of anonymous unions.

运行时变化

  1. core.atomic : msync has been removed
  2. Added overloads for core.atomic.cas which don't discard their result.
  3. Added core.atomic.atomicExchange.
  4. Non-POSIX CLOCK enum members have been removed from core.sys.posix.time
  5. The druntime option callStructDtorsDuringGC has been deprecated.
  6. core.sys.posix.dlfcn : dladdr, dlvsym, Dl_info have been removed
  7. core.exception: Remove onHiddenFuncError / HiddenFuncError
  8. core.exception : setAssertHandler has been removed
  9. core.thread : Fiber.call(bool) has been removed
  10. Module core.sys.linux.sys.netinet.tcp has been removed
  11. core.runtime : Runtime.initialize, Runtime.terminate functions taking ExceptionHandler have been removed
  12. Added core.stdcpp.string.
  13. Added core.stdcpp.vector.

标准库变化

  1. std.array.Appender and RefAppender: use .opSlice() instead of data()
  2. ErrnoException.errno is now nothrow pure @nogc @safe
  3. Nullable alias get this has been deprecated
  4. Added the std.file.getAvailableDiskSpace functionality.
  5. Allow std.json to overlook trailing comma

安装器变化

  1. Bundled libcurl is now built with DONT_USE_RECV_BEFORE_SEND_WORKAROUND

Dub 包管理器变化

  1. Support for dub global settings file at the root package level

您也可以查看完整的 changelog 内容。

展开阅读全文
点击加入讨论🔥(24) 发布并加入讨论🔥
本篇精彩评论
最近在玩Dlang,这语法写起来是真舒服,比Golang是真强不少,就是文档太少了,人也太少了,连个群都找不到
2019-10-15 16:35
3
举报
语法不错
2019-10-15 17:06
2
举报
Algol,Basic,c,Dlang,erlang,F#,golang
2019-10-16 08:40
1
举报
abcdefg占齐了,下面有请h语言(华为?)
2019-10-15 17:24
1
举报
24 评论
3 收藏
分享
返回顶部
顶部