Developing Simple Device Drivers with C++

Developing Simple Device Drivers with C++

1. The Powerful Advantages of C++ in Driver Development In the field of device driver development, C++ is a “powerful tool.” It inherits the precise control capabilities of C language over low-level hardware, allowing it to directly “communicate” with hardware, manage memory meticulously, and precisely control processor resources. This is crucial for device drivers that … Read more

C++ Exception Handling: Tips for Optimizing RAII and Resource Management

C++ Exception Handling: Tips for Optimizing RAII and Resource Management

C++ exception handling is one of the important features for improving program robustness and maintainability. In C++, resource management is closely related to exception handling, especially in ensuring that resources are correctly released in the event of an exception. In this regard, RAII (Resource Acquisition Is Initialization) is a very important design pattern that uses … Read more

Best Practices for Developing Redis Modules with C++

Best Practices for Developing Redis Modules with C++

Introduction by Alibaba This article attempts to summarize some issues encountered in developing Redis modules using C++ in Tair and crystallize them into best practices, hoping to provide some assistance to users and developers of Redis modules (some best practices also apply to C and other languages). Overview Redis started supporting the extension of its … Read more

Learn C++ Advanced: Class Reflection

Learn C++ Advanced: Class Reflection

1. Class Reflection After analyzing simple classes and structures, we can further analyze the reflection of ordinary classes. There are generally several situations for reflecting a class: 1. Creating and matching objects by class name 2. Reflecting class member variables 3. Reflecting class member functions 4. Handling class inheritance relationships. Here, we will only deal … Read more

C++ Smart Pointers: The Ultimate Memory Management Solution?

C++ Smart Pointers: The Ultimate Memory Management Solution?

Hello everyone! Today we will explore a very important C++ concept—smart pointers. As a beginner, you may encounter memory management issues during your learning process. Smart pointers were created to solve these problems; they help us manage memory better and avoid those pesky memory leaks. Next, I will guide you step by step to understand … Read more

Switching From C++ to Rust: Doubling Development Efficiency

Switching From C++ to Rust: Doubling Development Efficiency

Google’s Android Engineering Director Lars Bergstrom recently shared the company’s experience migrating projects written in Go or C++ to the Rust programming language at the Rust Nation conference. Bergstrom stated that although there were cases of rewriting code in the memory-safe Rust language as early as 2016 with Dropbox and 2018 with Figma, and the … Read more

Simulating Explosion Effects in C++

Simulating Explosion Effects in C++

>version : unreal engine 5.2< Today we are going to conduct a super interesting Tutorial, simulating explosion effects in C++ by adding a radial shockwave to all objects, with adjustable ranges. Create a new Actor named AddRadialForceActor, and do not need to add content in the header file for now. We will add all the … Read more

Why Dropbox Abandoned C++ for Cross-Platform Development

Why Dropbox Abandoned C++ for Cross-Platform Development

Authors: Zhao Yuying, Xiao Zhi Recently, Dropbox announced it would abandon using C++ to write cross-platform code for iOS and Android, opting instead for each platform’s native frameworks (Swift/Kotlin), citing the high hidden costs associated with code sharing. Interestingly, in 2014, during a presentation to Facebook developers, Dropbox openly stated that writing two sets of … Read more

Relearning C++ After C++11: Key Changes and Features

Relearning C++ After C++11: Key Changes and Features

Author | Frances Buontempo Translator | Zhang Weibin Editor | Ding Xiaoyun Key Takeaways: C++ is still very important and will always be. There are many resources to help us learn modern C++, including Godbolt’s Compiler Explorer, ISOCpp, and CppReference. C++ can be simpler than before. Besides enhancements related to convenience, potential performance improvements are … Read more

A C++ Programmer’s Introduction to Rust

A C++ Programmer's Introduction to Rust

AliMei’s Guide The author recently attempted to write some Rust code, and this article mainly discusses their views on Rust and some differences between Rust and C++. Background S2 learned the Pangu programming specification and the CPP core guidelines while promoting team coding standards, and then came to understand clang-tidy and Google’s exploration in security. … Read more