Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M6223

Callback

Callback
TechnicalHigh supportSoftware Engineering
Included
account_tree

Version 1.0.0 · Updated 2026-07-28

CORE DEFINITION

A callback function, or simply callback, is a reference to executable code in computer programming that is passed as an argument to other code; it is expected that this code will call back (execute) the callback function as part of its work. This execution can be immediate, as in synchronous callbacks, or it can occur at a later point in time, as in asynchronous callbacks. Programming languages support callbacks in different ways, often implementing them as subroutines, lambda expressions, blocks, or function pointers.

SCAFFOLDING EFFECT

psychology

Reduce cognitive load

A callback function, or simply callback, is a reference to executable code in computer programming that is passed as an argument to other code; it is expected that this code will call back (execute) the callback function as part of its work. This execution can be immediate, as in synchronous callbacks, or it can occur at a later point in time, as in asynchronous callbacks. Programming languages support callbacks in different ways, often implementing them as subroutines, lambda expressions, blocks, or function pointers.

anchor

Anchor fast decisions

A callback passes a function as an argument, and when a future event completes, the system calls it, implementing 'do it when the event arrives'. It hands control back to the framework (inversion of control), so the caller does not have to wait synchronously; it is the basis for asynchronous and plugin-based design.

MINIMUM ACTION

In progress 0/5

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more

Source support: Explicit

  • link
    zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E5%9B%9E%E8%B0%83%E5%87%BD%E6%95%B0ZH · Explicit
    verified

RELATED MODELS