D's tail

Adam D Ruppe destructionator at gmail.com
Tue Aug 10 01:57:49 UTC 2021


On Tuesday, 10 August 2021 at 00:53:29 UTC, Brian Tiffin wrote:
> How far back in time should D source age?

Most my code compiles with compilers up to 5 years old. Some will 
go back as far as 12 years old, though that's a fairly 
significant effort hat I don't bother with on anything except 
maintaining code from that era.

> Does anyone have 12 year old code that would recompile without 
> touching the sources?

I have some small modules that still will, but the vast majority 
of things do require an active effort to maintain compatibility 
from back then (especially if you want to support both new and 
old compilers).

The majority of these things are due to library changes. There 
was a period around 2011 where tons of little things changed, 
like tolower became toLower and std.date got removed, and stuff 
like that. Or of course in 2008ish when strings changed their 
type to immutable... None was too hard to update but it did force 
updates.


> Would it be reasonable to freeze code rather than deprecate and 
> remove?

yeah that's been closer to the policy in recent years.

> So it's a question.  What is a reasonable life expectancy for 
> the projects I start in D today?

It so depends on what you use. If you avoid outside libraries (at 
least copying them into your project), you can realistically keep 
it for many many years. But it does take some active effort.


More information about the Digitalmars-d mailing list