Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The term "callback" is usually used to refer to a function that you want called after the completion of an async operation

I’m not aware of any authoritative definition, but the term “callback” has been used for functions passed in as parameters to higher-order functions since long before the modern idioms for asynchronous code were around. The first use of the term I can remember personally was for the comparator function passed to qsort in C. That was probably sometime in the 1980s. Another common usage that goes way back is for event handlers in event-driven systems.



Exactly, the term typically used for the specific type of callback being discussed here is a "continuation callback", and the specific style is "continuation passing style"

The term is actually used correctly; callback's definition is broad. Of course, noone can resist the temptation to berate members of the JS community.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: