HN Hall of Fame Weekly email

Std::visit is everything wrong with modern C++

bitbashing.io Essays & writing Essays & articles Software engineering Candidate
Screenshot of bitbashing.io captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 2 calendar years, with breakout response in 2 of them.

submissions
3
submitters
3
observed span
2017–2020
peak thread · 232 comments
201 pts
latest 20+ return · 2020-12-05
120 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

From the article: > it’s completely bonkers to expect the average user to build an overloaded callable object with recursive templates just to see if the thing they’re looking at holds an int or a string. You don't have to: http://en.cppreference.com/w/cpp/utility/variant/holds_alter... (and http://en.cppreference.com/w/cpp/utility/variant/get to access the value).

I think using this feature is the wrong advice. Frankly I think much of modern C++ should be rejected. If you want to use a language like with those features then fricken switch language! There are countless better alternatives today: Rust, Swift, D, Haskell etc. Many are stuck on C++ for legacy reasons. I have worked in such large C++ legacy systems for many years in the past. The average programmer simply cannot deal effectively with this modern C++. It…

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
324

reference only — not used in Hall rules or ranking

Total comments
376

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2017-09-14Std::visit is everything wrong with modern C++First breakout · Best threadfoob201144
2020-10-29Std: Visit is everything wrong with modern C++mmm_grayons30
2020-12-05Std::visit is everything wrong with modern C++ (2017)Latest 20+ point returnxucheng120232