The Case Against Almost Always Auto in C++
Posted4 months agoActive4 months ago
gist.github.comTechstory
skepticalmixed
Debate
30/100
C++Programming PracticesCode Readability
Key topics
C++
Programming Practices
Code Readability
A developer argues against the overuse of 'auto' in C++, sparking a discussion about code readability and tooling.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
12m
Peak period
3
0-1h
Avg / period
3
Key moments
- 01Story posted
Sep 2, 2025 at 6:58 PM EDT
4 months ago
Step 01 - 02First comment
Sep 2, 2025 at 7:10 PM EDT
12m after posting
Step 02 - 03Peak activity
3 comments in 0-1h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 2, 2025 at 7:48 PM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45110215Type: storyLast synced: 11/17/2025, 10:07:59 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
The reason auto exists is because the type can be trivially infered.
Your editor should be able to show you the types.
2. To show me the types my editor requires me to, in the best case, hover the mouse over the keyword, which is 100x slower as moving my eyeballs. In the worst case it additionally takes several seconds to compute the type (my shop uses metaprogramming heavily).
2. Type annotations are always on on VScode for rust in places they are omitted. There must be a setting in your editor to show you the types without highlighting. It might take a bit to load at startup though.