On Wed, Jun 3, 2015 at 12:14 AM, Joshua Cranmer 🐧 <pidgeo...@gmail.com> wrote:
> The case which I am personally very much on the fence is integral types. On
> the one hand, sometimes the type just doesn't matter and you want to make
> sure that you have the same type. On the other hand, I have been very burned
> before by getting the signedness wrong and having code blow up.

Also, what if you make it the wrong type by mistake?  Maybe you
mistyped it, or made an incorrect assumption, or were sloppy in
copy-pasting, or someone changed the type and didn't update all the
callers.  If the type you use is smaller than the real type, you could
wind up truncating.  This is particularly true if it's a signed value
and you incorrectly use an unsigned value.  If I remember correctly,
we have compiler warnings for these errors disabled.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to