Auto Obscures the Actual Type
Item 46: Auto is great, but it obscures the actual type. Use static_cast to clarify: auto x = static_cast<int>(EntityCount());
A screenshot of a programming post showing a C++ code example where `auto` hides the actual type and `static_cast<int>` makes it explicit. The joke is aimed at programmers who find overly implicit typing annoying and prefer clear, explicit code. EN: A screenshot of a programming post showing a C++ code example where `auto` hides the actual type and `static_cast<int>` makes it explicit. The joke is aimed at programmers who find overly implicit typing annoying and prefer clear, explicit code.
- @ithueti / 2245 2020-04-06
- Template
- Twitter screenshot
- Type
- image
- Size
- 542×211 · 25.5 KiB
- Mood
- саркастичный
- Language
- en
- Added