So why double to float conversion is implicit ?
Ola Fosheim Grøstad
ola.fosheim.grostad+dlang at gmail.com
Sun Oct 22 11:51:27 UTC 2017
On Sunday, 22 October 2017 at 10:57:24 UTC, NX wrote:
> D is not C/C++ either. I fail to see how does it help to be C++
> compliant. It's absolutely trivial to tell the compiler that
> conversion is on purpose by explicitly casting and it immensely
> helps to reduce bugs (since we are humans after all).
Right, which is why C++ compilers will warn you about conversions
that can be lossy. A lot of stuff that is valid C++ will be
detected and complained about in typical production setups.
The D community thinks that all warnings should be errors, so I
really don't think the argument that C++ allows something is a
good one.
More information about the Digitalmars-d
mailing list