Thoughts on versioning

Adam D Ruppe destructionator at
Fri Oct 29 20:39:56 UTC 2021

On Friday, 29 October 2021 at 19:21:43 UTC, harakim wrote:
> I dread coming back to my projects and having to spend time to 
> get them to recompile.

Do you have a recollection of why, specifically they would fail 
to compile when you get back to them? Language changes? Std lib 
changes? Third party libs? And how difficult it was to update 

"breakage" isn't really a binary yes/no thing. Some are worse 
than others. One example I did in my minigui was misspell a word. 
I made that a deprecated alias with the message saying "it was 
misspelled, use THIS instead".

Now, worth noting, that isn't exactly breakage, since you can 
just ignore the message. I've left it like that for years now; it 
doesn't really hurt anything. (My own libs' policy is actually 
pretty strict - I almost never break anything and maintain 
compatibility with both old and new compilers, and with simple 
build systems; my "no breakage" policy even includes the specific 
compile command line. And when I do break something, I make it as 
easy as I can think of to make migration quick and painless.)

But still that's an example of a partial break that is easy to 
deal with. Should be able to update it in a matter of minutes.

And compatibility shims are easy: the deprecated alias is 
something you could too in your code. Doesn't have to be in mine. 
So you can choose your own compiler as well.

This is how I'd like the stdlib to be too. Where changes are 
needed, you make it easy. Where they're not needed, you can leave 
it alone.

Phobos needs some changes right now. That doesn't mean you have 
to delete the current code, but you also can't leave it alone out 
of fear of what might happen.

> Why doesn't it compile?

I'd like to know that too. Is it really the language's fault? And 
why couldn't you keep using the same version you had before?

More information about the Digitalmars-d mailing list