On Friday, December 23, 2011 23:52:00 Timon Gehr wrote: > There is really no problem with that. I have never seen anyone complain > about implicit bool -> int conversion. Why do you think it is bad? Does > anyone have an example to back up the claim that it is bad?
They're completely different types and mean completely different things. It's one thing to convert from a narrower integer to a wider one, but bool is _not_ an integer. Would you implicitly convert a string to an int? No. It's not a number. I don't see any reason to treat bool any differently on that count. bool isn't a number either. It's true or it's false. The problem is that C conflated bool with int, and on some level that behavior still exists in D. But bool and int are two entirely different types and entirely different concepts. - Jonathan M Davis
