https://issues.dlang.org/show_bug.cgi?id=23059
Walter Bright <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |WONTFIX Severity|normal |enhancement --- Comment #1 from Walter Bright <[email protected]> --- 1. As you note, unlike C, D doesn't do implicit integer narrowing conversions. Here, C is calling D templates, and isn't doing those conversions. Should they, is an interesting topic. I suggest that D templates are written to work with D style conversions. Adding a special case for C may wind up doing things like unexpectedly instantiate the wrong template. I am concerned this may be risky, and it may be difficult to set up templates that will work with both D and C. Fortunately, the workarounds from the C side are simple - a cast. The accommodations for the D side are also simple - add more overloads that take the larger types, cast them, then forward to the function with the narrower types. 2. This is similar, allowing the C implicit conversion of integers to pointers. Frankly, this could be letting a cat loose in an aviary. I expect it would be pretty risky, and again the accommodations are simple, so it is not worth it to adjust the semantics. We should be in good shape here without risking adding C's error prone implicit conversions on the D side. --
