Tagged articles
12 articles
Page 1 of 1
IT Services Circle
IT Services Circle
Mar 5, 2026 · Fundamentals

Simulating OOP Polymorphism in C with Function Pointers and Vtables

The article walks through a C programmer's journey from hard‑coded if‑else shape handling to embedding function pointers in structs, introducing shared function tables, automatic initialization, memory savings, inheritance via table overrides, and finally showing how C++ virtual functions automate the same mechanism.

C ProgrammingInheritancePolymorphism
0 likes · 10 min read
Simulating OOP Polymorphism in C with Function Pointers and Vtables
Liangxu Linux
Liangxu Linux
Dec 24, 2025 · Fundamentals

Mastering C Function Pointers: From Basics to Embedded Applications

This tutorial explains what function pointers are, how to declare and use them in C, and demonstrates practical embedded‑system patterns such as callbacks, state machines, command dispatch, and advanced techniques like pointer arrays and struct members, while highlighting common pitfalls.

Callbacksc++command dispatch
0 likes · 13 min read
Mastering C Function Pointers: From Basics to Embedded Applications
Cognitive Technology Team
Cognitive Technology Team
Sep 14, 2025 · Backend Development

How to Simulate Function Pointers in Java: Interfaces, Lambdas, and More

This guide explains how Java can mimic function pointers using interfaces with anonymous classes, lambda expressions, built-in functional interfaces, method references, reflection, the command pattern, and enum-based implementations, comparing their advantages, drawbacks, and ideal use cases for modern and legacy codebases.

Functional InterfacesLambdafunction pointers
0 likes · 14 min read
How to Simulate Function Pointers in Java: Interfaces, Lambdas, and More
Liangxu Linux
Liangxu Linux
Jul 24, 2025 · Fundamentals

How to Embrace Object‑Oriented Design in Pure C

This article demonstrates how to simulate object‑oriented programming in C by using structs and function pointers, defines a list interface, provides a full implementation with insertion, deletion, traversal, and testing code, and explains why such techniques improve readability and maintainability.

Data Structuresc++function pointers
0 likes · 10 min read
How to Embrace Object‑Oriented Design in Pure C
Liangxu Linux
Liangxu Linux
Sep 17, 2024 · Fundamentals

Unlocking Automatic Module Initialization with Linux Kernel Initcall on STM32

This guide explains how to replicate Linux kernel's initcall mechanism in STM32 projects by using function‑pointer sections, modifying the linker script, and defining ordered initialization macros to replace sequential main‑function calls, enabling modular and loosely‑coupled code execution.

InitcallLinux kernelSTM32
0 likes · 8 min read
Unlocking Automatic Module Initialization with Linux Kernel Initcall on STM32
Liangxu Linux
Liangxu Linux
Dec 27, 2023 · Fundamentals

Why Callbacks Are Just Function Variables: A Simple C Example

This article explains that callbacks are essentially function variables, illustrating the concept with plain C code examples, comparing direct function calls to passing functions as parameters, and showing how this approach avoids massive if‑else chains while keeping the logic clear and reusable.

C ProgrammingCallbacksfunction pointers
0 likes · 3 min read
Why Callbacks Are Just Function Variables: A Simple C Example
Tencent Cloud Developer
Tencent Cloud Developer
Dec 12, 2023 · Fundamentals

Understanding Go Function Pointers and Their Performance Impact

The article explains how Go’s function values introduce an extra indirection and trigger escape analysis, making indirect calls slower than C pointers, and offers optimization tactics such as avoiding function‑pointer calls, using switch‑based dispatch, or applying the unsafe noescape trick when safe.

Escape AnalysisGocompiler
0 likes · 15 min read
Understanding Go Function Pointers and Their Performance Impact
Liangxu Linux
Liangxu Linux
Sep 29, 2018 · Fundamentals

Mastering Function Pointers and Types in C++: A Practical Guide

This article explains the distinction between function pointers and function types in C++, shows how to declare, assign, and pass them as parameters, and demonstrates returning pointers to functions with clear code examples and typedef/decltype techniques.

C++decltypefunction pointers
0 likes · 5 min read
Mastering Function Pointers and Types in C++: A Practical Guide