Tag: callback
5 posts
-
C++ Function Pointers: Declaration Syntax, Callbacks, Dispatch Tables, and std::function
C++ function pointers explained: declaration syntax, using aliases, callbacks with void* context, dispatch tables, sort comparators, member function pointers, and when to use std::function or templates instead.
-
Node.js Async Programming: Callbacks and Promises
Learn Node.js async I/O: callbacks, error-first style, Promises, async/await, the event loop, streams, and patterns for APIs and file pipelines.
-
JavaScript Async Programming: Promises, async/await, and the Event Loop Without the Usual Bugs
JavaScript asynchronous code explained: callbacks vs Promises, async/await, Promise combinators, the microtask queue, and fixes for real bugs such as unhandled rejections, timeouts that never cancel, retries that skip HTTP errors, and duplicate cached requests.
-
The Observer Pattern in C++: weak_ptr Subscribers, Typed Events and Signal/Slot Designs
Observer pattern in C++: decouple publishers and subscribers, weak_ptr, typed events, signal/slot style—patterns, pitfalls, and production examples.
-
std::function vs Function Pointers vs Template Callables in C++: Type Erasure Cost, SBO and C Interop
std::function vs function pointer vs template in C++: why capturing lambdas cannot convert, when std::function allocates, move-only captures, C void* data.