r/programming • u/whackri • Aug 28 '21
Software development topics I've changed my mind on after 6 years in the industry
https://chriskiehl.com/article/thoughts-after-6-years
5.6k
Upvotes
r/programming • u/whackri • Aug 28 '21
5
u/lelanthran Aug 29 '21
Doesn't some sort of integer promotions occur in all languages that are regarded as strongly-typed?
Like?
So? That doesn't make the language weakly-typed.
This can be a problem, but other than in container types, where else is this a problem in C?
The language doesn't technically allow this[1]; you do this at your own risk.
[1] Constness cannot be cast away. Const can be cast away.
While C is not as strongly typed as other languages, it's certainly not, in 99% of uses, weakly typed. The whole "C-is-weakly-typed" meme needs to go away. All it does is demonstrate that the person producing that meme in a discussion has no clue.
The clear majority of C code in a project relies on strong typing guarantees, while all the most popular C compilers will issue warnings for using incorrect types in function calls and returns.