Fixing C's Biggest Mistake

Walter Bright newshound2 at digitalmars.com
Thu Dec 22 20:44:50 UTC 2022


On 12/22/2022 4:05 AM, Siarhei Siamashka wrote:
>> The request is always "I want X bug fixed, I want to keep the old Y feature, I 
>> want the new Z feature."
> 
> What's wrong with such request? Assuming that the new feature Z doesn't break 
> compatibility.

Everyone has a different XYZ combination they want. This is why versioning does 
not work.


>> But the people objecting to breaking code also object to using a -revert switch.
> Again, is this -revert switch really useful for anything?

More useful than versions.


> Would selecting some compiler version as LTS and backporting only minor bugfixes 
> to it require too much effort?

If someone wants to volunteer to do this, I would welcome it. In fact, an LTS 
version isn't even necessary. Any fix could be backported to any previous D release.


> Not every bugfix comes with breaking existing code.

I didn't say every. But a lot of critical bugs do.


> And there's a big difference between breaking the existing *buggy* code (the 
> maintainers of such existing code will be grateful for getting the bug exposed) 
> and breaking some perfectly *valid* existing code due to unnecessary language 
> syntax changes (the maintainers of such existing code will be only annoyed).

One person's valid code is another's bug. Fixing autodecoding, for example, 
breaks existing code.


More information about the Digitalmars-d mailing list