IMHO you're looking at it the wrong way. The question is, will Ada make my project empirically succeed more than C, the answer is, oh yeah!pic.twitter.com/Cel1RjPRNT
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Solving the latter problem with range checks before arithmetic (or known invariants) automatically avoids the UB.
And the overflow being UB allows good implementations to trap & crash on overflow.
In, e.g., Ada, the standard requires compilers to trap overflow, if user wishes, much much better than ad-hoc, not always avail, not for>
Requiring trap is attractive but problematic. Precludes almost all algebraic transformations at compile time. Analogous to fenv for floats.
You don't always require trap. There's the equivalent of pragma in the standard that mandates trap. Makes sense for non hot-path. Tunable
A pragma comparable to STDC FENV_ACCESS would be nice here, IF compilers even implemented stuff like that...
Fact is, in Ada they did. At any rate, UB is hard to justify here IMHO, esp w/o UBsan. BTW Android sort-of doing trap with the new UB-runtim
Another thing I forgot about Power Tools analogy. *Very* easy to understand safety guide. C expert fail internalize C safe programming rules
I've always wondered why CPU makers ever implemented Nbit x Nbit = Nbit multiply instructions, instead of Nbit x Nbit = 2Nbit.
They usually do the latter. Problem is lack of arbitrarily large types.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.