5 ms·
Type inference only make the code harder to read. You ended doing mental compiler work when you could just write the damm type. And the people who say "I Just
by pmarin 3y ago
Type inference only make the code harder to read. You ended doing mental compiler work when you could just write the damm type.
And the people who say "I Just hover the variable in my IDE" It doesn't work in a terminal with grep, you can't hoved a diff file and not even github do the hover thing.
Combine that with the implicit type promotion rules of C. Have Fun.
- masklinn 3y ago> Type inference only make the code harder to read. Nonsense. > Combine that with the implicit type promotio rules of C. Have Fun. This sort of trivial TI does not make that any worse. C is broken, it neither breaks nor unbreaks C.
- hgs3 3y agotypeof and auto are useful for writing type-generic macros.
- pmarin 3y agoYeah but looking how auto has been abused in C++ I don't think it worth it.
- peterfirefly 3y agoC23's auto is not nearly as magic as C++'s auto. You can use it for the simple things but not for the perversely creative abuse scenarios you fear.