Tagged articles
16 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Oct 3, 2025 · Fundamentals

Why Modern C++ Templates Are Getting Simpler: From SFINAE to Concepts

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++20SFINAE
0 likes · 7 min read
Why Modern C++ Templates Are Getting Simpler: From SFINAE to Concepts
Liangxu Linux
Liangxu Linux
Sep 14, 2025 · Fundamentals

Why C’s void* Pointer Is the Secret to Generic Programming

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.

Type SafetyVoidc++
0 likes · 6 min read
Why C’s void* Pointer Is the Secret to Generic Programming
Liangxu Linux
Liangxu Linux
Sep 10, 2025 · Fundamentals

Why Void Pointers Matter in C: Flexibility and Generic Programming

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
Why Void Pointers Matter in C: Flexibility and Generic Programming
php Courses
php Courses
Sep 3, 2025 · Fundamentals

Mastering C++11’s auto: Rules, Benefits, and Common Pitfalls

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.

C++11autobest practices
0 likes · 9 min read
Mastering C++11’s auto: Rules, Benefits, and Common Pitfalls
Liangxu Linux
Liangxu Linux
Aug 28, 2025 · Fundamentals

When to Use Function Templates vs Class Templates in C++? A Practical Guide

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
When to Use Function Templates vs Class Templates in C++? A Practical Guide
php Courses
php Courses
Aug 27, 2025 · Fundamentals

Mastering C++ STL: Vectors, Maps, and Sort with Real-World Examples

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.

MAPSTLVector
0 likes · 12 min read
Mastering C++ STL: Vectors, Maps, and Sort with Real-World Examples
php Courses
php Courses
Aug 26, 2025 · Fundamentals

Mastering C++ Class Templates: From Basics to Advanced Usage

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++ best practicesc++class templates
0 likes · 7 min read
Mastering C++ Class Templates: From Basics to Advanced Usage
php Courses
php Courses
Aug 22, 2025 · Fundamentals

Why Use Function Templates in C++? A Complete Guide to Syntax and Usage

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++function templatesgeneric programming
0 likes · 9 min read
Why Use Function Templates in C++? A Complete Guide to Syntax and Usage
Code Mala Tang
Code Mala Tang
Sep 24, 2024 · Frontend Development

Why Avoid the Generic Function Type in TypeScript and What to Use Instead

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.

Type SafetyTypeScriptfunction types
0 likes · 7 min read
Why Avoid the Generic Function Type in TypeScript and What to Use Instead
Code Mala Tang
Code Mala Tang
Sep 23, 2024 · Frontend Development

Mastering TypeScript’s infer: How to Extract Types Automatically

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 TypesInferType Inference
0 likes · 9 min read
Mastering TypeScript’s infer: How to Extract Types Automatically
DaTaobao Tech
DaTaobao Tech
Jul 26, 2024 · Frontend Development

Practical TypeScript Techniques for Developers

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 componentsType SafetyTypeScript
0 likes · 10 min read
Practical TypeScript Techniques for Developers
MaGe Linux Operations
MaGe Linux Operations
Jun 29, 2024 · Fundamentals

Unlock Go’s Empty Interface: Store Any Type Anywhere

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 Examplesempty interfacegeneric programming
0 likes · 6 min read
Unlock Go’s Empty Interface: Store Any Type Anywhere
MaGe Linux Operations
MaGe Linux Operations
Apr 29, 2024 · Fundamentals

Unlocking Go’s Empty Interface: Store Any Type in One Variable

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.

GoInterfaceempty interface
0 likes · 5 min read
Unlocking Go’s Empty Interface: Store Any Type in One Variable
Aotu Lab
Aotu Lab
Sep 15, 2022 · Fundamentals

Mastering TypeScript Type Gymnastics: From Basics to Advanced Type Programming

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
Mastering TypeScript Type Gymnastics: From Basics to Advanced Type Programming
Tencent Cloud Developer
Tencent Cloud Developer
Jun 22, 2022 · Fundamentals

Understanding C++ Customization Points: CPO, tag_invoke, and Ranges

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
Understanding C++ Customization Points: CPO, tag_invoke, and Ranges