DMD can implicitly convert class pointer to the bool. Is it bug or terrible feature?

Chris Cain clcain at uncg.edu
Tue Nov 26 00:33:57 PST 2013


On Tuesday, 26 November 2013 at 08:23:15 UTC, bearophile wrote:
> That is named "relying on hand-managed name conventions for 
> something that could be the job of the compiler type system".

Sure. It'd have been nice if the language was designed to avoid 
these types of problems from the beginning (though a language 
feature/syntax rules to learn dedicated to a problem that is 
easily solved with a naming convention would be debatable). But 
it wasn't and it'd break too much code for a minuscule gain and 
there exists a reasonable workaround (that also is commonly used 
everywhere else for this same problem in most other languages). 
Changing this now would be horrifically bad and the benefit of 
such a change is effectively nothing.


More information about the Digitalmars-d mailing list