Tagged articles
generic programming
16 articles · Page 1 of 1
This article traces the evolution of C++ template constraints—from the cryptic SFINAE and enable_if techniques, through the clearer constexpr if introduced in C++17, to the expressive and user‑friendly Concepts of C++20—showing how each step makes generic programming more readable and maintainable.
C++C++20Concepts
0 likes · 7 min read

The article explains how C’s strong type system limits flexibility, how the void* pointer serves as a universal type enabling generic programming, with examples like qsort, malloc, memcpy, and pthread_create, while also discussing the trade‑offs such as loss of type safety and readability.
C++Voidgeneric programming
0 likes · 6 min read

The article explains that the C language’s void* type serves as a universal pointer, detailing its strong versatility, role as a common interface for memory‑management functions, foundation for generic programming, support for object‑oriented patterns, and usage considerations such as required casting, inability to dereference directly, and type‑safety trade‑offs.
C++generic programmingtype casting
0 likes · 7 min read

This article explores C++11’s auto keyword, detailing its type deduction rules, advantages, typical use cases such as iterator and lambda handling, and highlights common pitfalls and best‑practice guidelines to help developers write clearer, safer, and more efficient code.
Best PracticesC++C++11
0 likes · 9 min read

This article explains the differences between C++ function templates and class templates, shows when each should be chosen, provides clear code examples for both, and offers practical tips, advanced techniques, and a decision guide to help developers select the right template for their tasks.
C++class templatefunction template
0 likes · 9 min read

This tutorial explains the core components of the C++ Standard Template Library—vector, map, and sort—showing their basic usage, generic capabilities, and how they can be combined in practical code examples such as product sorting and a word‑frequency counter.
C++STLVector
0 likes · 12 min read

This article explains the core concepts of C++ class templates, covering their definition, basic syntax, simple examples, multi-parameter templates, default parameters, specialization, and practical applications such as generic containers and a stack implementation, while offering best practices for effective template programming.
C++C++ best practicesclass templates
0 likes · 7 min read

This article explains why function templates are needed in C++, shows their basic syntax, demonstrates how to instantiate and explicitly specify template arguments, and covers overloading, providing clear code examples that illustrate generic programming benefits.
C++Template Syntaxfunction templates
0 likes · 9 min read

The article explains how C’s strong type system makes the void* pointer a powerful generic mechanism for data structures, callbacks, and memory functions, while also highlighting the trade‑offs in type safety, readability, and potential runtime errors.
C++generic programmingmemory management
0 likes · 6 min read

This article explains why using the generic Function type in TypeScript can break type safety, demonstrates better alternatives with explicit signatures, shows practical examples with generic sum functions and YouTube video data, and highlights the advantages of TypeScript's type inference and utility types.
TypeScriptfunction typesgeneric programming
0 likes · 7 min read

This article explains the TypeScript infer keyword, how it works within conditional types to automatically extract type information, and provides detailed examples for array element inference, function return types, and parameter extraction, highlighting its benefits for flexible and type‑safe code.
Conditional TypesInferTypeScript
0 likes · 9 min read

The article offers a hands‑on guide to essential TypeScript patterns—using never for exhaustive switches, XOR for mutually exclusive unions, smart literals, the satisfies keyword, template‑string unions, interface remapping, infer‑based extraction, built‑in utilities, and correctly typed generic React components—complete with ready‑to‑copy code examples.
React componentsTypeScriptUtility Types
0 likes · 10 min read

An empty interface in Go, defined without methods, can hold values of any type, enabling flexible data structures like slices, maps, and structs, and is commonly used in functions such as fmt.Println; this article explains its definition, usage, memory layout, and copying nuances with code examples.
Code ExamplesType Systemempty interface
0 likes · 6 min read

An empty interface in Go, defined as interface{}, can hold values of any type because it has no methods, enabling flexible data structures like slices, maps, and structs, and is commonly used in functions such as fmt.Println, though copying between typed and empty interface slices requires careful handling.
GoType Systemempty interface
0 likes · 5 min read

This comprehensive guide explains the concept of type gymnastics, explores TypeScript's type system, demonstrates key type operations and patterns, and walks through practical implementations of advanced utility types and a custom ParseQueryString type.
TypeScriptadvanced typesgeneric programming
0 likes · 16 min read

This article explains how modern C++ libraries achieve extensible interfaces using Customization Point Objects and the tag_invoke mechanism, compares classic techniques, details the implementation of ranges::begin, and shows how tag_invoke provides a scalable, concept‑friendly alternative for generic library design.
C++CPOCustomization Point Object
0 likes · 17 min read
