Why Phobos is cool

Petar Petar
Thu Jun 25 14:00:43 UTC 2020


On Thursday, 25 June 2020 at 11:09:04 UTC, Avrina wrote:
>
> 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.

Breaking changes are not a problem. As someone who was very 
involved in pull request reviews in the past, I can definitely 
say that outside of std.experimental, for the past few years we 
have been relatively rigorous (compared to say 5 years ago), and 
almost every breaking change that we were aware has first gone 
through a deprecation process.

So breaking changes are not a problem by themselves. The problem 
is how they're delivered. The problem is that Phobos is 
distributed as part of each compiler release. You can't keep 
using an older version of Phobos if you need the new platform 
support of say LDC 1.22.0. And vice versa, if you need a new 
Phobos function, but there's a compiler bug preventing you from 
upgrading you're again stuck between a rock and a hard place.

And what frustrates me the most is that this is an already solved 
problem technically, it's just that the community doesn't want to 
reach consensus on using and investing in improving Dub. Today, 
in all of our projects at work, the version of TypeScript that we 
used is managed by SemVer. The version of all our dependencies is 
also managed by SemVer. If I want to use the latest language 
features of TypeScript, I'm not afraid to upgrade it, as each of 
my dependencies can use whatever TS version they want (again 
following SemVer), and so on.


More information about the Digitalmars-d mailing list