DIP 1015--Deprecation of Implicit Conversion of Int. & Char. Literals to bool--Formal Assement

12345swordy alexanderheistermann at gmail.com
Wed Nov 14 19:24:20 UTC 2018


On Wednesday, 14 November 2018 at 18:11:59 UTC, Neia Neutuladh 
wrote:
> On Tue, 13 Nov 2018 20:27:05 -0800, Walter Bright wrote:
>> There have been various attempts over the years to "fix" 
>> various things in the D matching system by adding "just one 
>> more" match level.
>
> I kind of feel like, if something would be confusing like this, 
> maybe the compiler shouldn't be making an automatic decision. 
> Not "just one more" match level, but just...don't match. If 
> there are multiple matching overloads, just error out. Don't 
> try to be clever and surprise people, just tell the user to be 
> more explicit.

That type of behavior is best left to the programmer defining the 
public interface.

-Alex


More information about the Digitalmars-d-announce mailing list