Why Phobos is cool
Avrina
avrina12309412342 at gmail.com
Thu Jun 25 11:09:04 UTC 2020
On Thursday, 25 June 2020 at 06:52:05 UTC, Petar Kirov
[ZombineDev] wrote:
> Since std.experimental.allocator was added to Phobos circa
> 2015, there hasn't been a single Phobos or Druntime module
> using it (ndslice and checkedint don't count). Many packages on
> code.dlang.org enthusiastically embraced
> std.experimental.allocator only to get burned a few dmd
> releases after as Phobos doesn't follow SemVer. The solution?
> Many of the most popular OSS D apps libraries (I can only
> comment on those) transitioned to using the Dub fork:
> https://github.com/dlang-community/stdx-allocator. How does it
> help? Well, OSS D libraries can't control the compiler that
> their users are using. For example, vibe.d tries to support the
> last 5 major versions of dmd/ldc, and Dub the last 15+ major
> versions. This means they can't depend on std.experimental.* as
> there's no telling what kind changes can happen for such a
> large timespan. Instead they can stick a particular version of
> https://code.dlang.org/packages/stdx-allocator in their
> dub.{json,sdl} file and be sure that it won't suddenly break
> their code.
This gets brought up quite often. Breaking changes doesn't seem
to be a concern. I'm not even talking about the DIP changes that
are going to cause breaking changes. There's just compiler
changes that break codes for almost every new release. There
doesn't even need to be a big change, just slowing down the
releases would help. So there's less versions you have to deal
with to support a longer term of time.
More information about the Digitalmars-d
mailing list