|
![](/i/fill.gif) |
>>It's a fine point, but I think it is more than just a platform/compiler
>>quirk
>
>Well, most compilers have this, but then they have it as an *option*, they
>don't force these warnings!
One man's bug is another man's feature. As I recall your objection -
"Just because MS VC complains, doesn't mean we should fix it"
If you're not using MS VC, why complain about the behavior of it?
I think it is appropriate to be explicit about floating point
truncation in the context of numerically sensitive code.
To me, an explicit cast indicates a "Yes I'm sure I want
to do this", to you it's a nuisance. I've found that paranoid
warnings actually help avoid problems later on - why do
you insist that making use of this information is
"non-standard" or that the compiler is "buggy" for doing
so?
I am not advocating "automatic explicit casting" as your
example may suggest. I like to see code compiling clean
on different platforms. I don't mind having to dot my
i's and crossing my t's to appease each different compiler,
it actually reveals something about the maturity and
philosophy of the compiler.
It sounds like we're both arguing from experience,
from different perspectives. You're pointing to
the standard treatment of floats and doubles in
the context of implicit casting. I'm pointing to the
(pragmatic) benefit of identifying bugs early.
We like to make different trade-offs.
And uh, I think we both need to keep in mind that this
argument is pretty academic. It doesn't bother me
greatly enough to upset a fellow povray developer,
or get them offside. So, if you're feeling that I'm a total
heretic for not agreeing with you, let me know and
I'll argue less strongly.. :-) I 99% agree with everything
you say anyway!
Post a reply to this message
|
![](/i/fill.gif) |