HN Hall of Fame Weekly email

Callbacks in C++ using template functors (1994)

www.tutok.sk Essays & writing Essays & articles Software engineering Candidate
Screenshot of www.tutok.sk captured 2026-07-20
Page preview · captured 2026-07-20

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

submissions
6
submitters
5
observed span
2012–2025
peak thread · 50 comments
66 pts
latest 20+ return · 2025-10-05
49 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

For a more modern form of this, take a look at Boost.Signals2. https://www.boost.org/doc/libs/1_68_0/doc/html/signals2.html It provides a slightly nicer interface in that signals can be defined in a single template argument, vs. splitting args / return type as separate template arguments. For example: boost::signals2::signal<void (float, float)> sig; would allow the following function as a slots: void do_something(float x, float y) { ... } There's also Qt's signal/slots implementation…

kenrose·66-point thread·

I know everyone here knows Rich Hickey from Clojure, but I'm a C/C++ programmer from the '90s and I primarily know him for "Hickey functors", which were the de facto standard way of doing object-oriented callbacks in C++. Also, while I am sure they were for the time a near-optimal solution, they are f'ing gross, so "Hickey functor" is a bit of an epithet. "Oh well, better than Hickey functors" was a justification for a lot of Gang-of-four pattern goop…

tptacek·65-point thread·

Heard about this watching Casey Muratori's "The Big OOPs" talk [0]. Thought it couldn't be _that_ Hickey, but turns out it was! [0] https://youtu.be/wo84LFzx5nI?si=SBv1UqgtKJ1BH3Cw&t=5159

zengid·49-point thread·

Classic from Rich Hickey. I remember mugging this up for a C++ interview in late 96. It was state of the art then.

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
196

reference only — not used in Hall rules or ranking

Total comments
117

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2012-07-17Rich Hickey on Functors in C++ (1994)Rickasaurus6514
2015-10-19Callbacks in C++ using template functors (1994)talles132
2016-08-31Callbacks in C++ using template functors – Rich Hickey (1994)vmorgulis21
2018-12-10Callbacks in C++ using template functors (1994)First breakout · Best threadtosh6650
2020-07-21Callbacks in C++ Using Template Functors (Rich Hickey, 1994)tosh10
2025-10-05Callbacks in C++ using template functors (1994)Latest 20+ point returnzengid4950