Thoughts on versioning

H. S. Teoh hsteoh at
Wed Oct 27 16:33:05 UTC 2021

On Wed, Oct 27, 2021 at 03:06:10PM +0000, Adam D Ruppe via Digitalmars-d wrote:
> On Wednesday, 27 October 2021 at 14:51:06 UTC, Steven Schveighoffer wrote:
> > There is literally no way to reproduce the abomination known as an
> > autodecoding for backwards compatibility. I tried.
> in that case realistically you can't make a v2 act sane to strings
> when built on v1 either, meaning the only choice is to rewrite (aka
> copy/paste aka fork) as needed.
> I'm ok with that.

Couldn't we just do something like this?

	// Phobos v1
	auto someStringFunc(R)(R range)
		static if (willAutoDecode!R) {
			// old v1 code here
		} else {
			// thin wrapper over v2 code


It is widely believed that reinventing the wheel is a waste of time; but I disagree: without wheel reinventers, we would be still be stuck with wooden horse-cart wheels.

More information about the Digitalmars-d mailing list