int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

Neia Neutuladh neia at ikeran.org
Sun Sep 16 23:10:07 UTC 2018


On Sunday, 16 September 2018 at 17:33:27 UTC, Steven 
Schveighoffer wrote:
> As precedent, we do have -transition=intpromote, which disables 
> the requirement for casting smaller integers to int first.

And -dip1000. Maybe it would be nice to have a generic 
-future=[changeid] flag.

I'd like it if these features could be implemented orthogonally 
enough that we could opt in on a per-module basis and have the 
same compiler compatible with a much wider range of code. That 
would be a fair bit of work.

> Hm... another option is to have a switch identify "useless" 
> casts once the deprecation period is over. Or add it into dfix.

Adding it to dfix would be nice, but dfix isn't official or 
distributed with dmd by default.

Also, dfix uses libdparse internally, which is insufficient for 
handling this type of analysis. libdparse parses code, but this 
requires figuring out which overloads would be called.


More information about the Digitalmars-d mailing list