Deprecate implicit conversion between signed and unsigned integers

Dukc ajieskola at gmail.com
Mon May 13 12:48:04 UTC 2024


Paul Backus kirjoitti 12.5.2024 klo 16.32:
> D would be a simpler, easier-to-use language if these implicit 
> conversions were removed. The first step to doing that is to deprecate 
> them.
Ditching all backwards-compatibility issues, it would be a good idea. 
But, this would cause *tremendous* amounts of breakage.

Before, I would have said it simply isn't worth it. But since we're 
going to have editions, maybe. I'm still somewhat sceptical though. 
Nothing will break without a warning and people can stay at older 
editions if they want, but it's going to add a lot of work for someone 
migrating 100_000 lines to a new edition. That amount of code will 
likely have hundreds or even thousands of deprecations to fix.

I tend to think that if we will write an official automatic tool to add 
the needed casts, it's probably worth it. Otherwise not.


More information about the dip.ideas mailing list