In this post, the author discusses a cross-language issue between C, C++, and Rust related to empty slices of memory. They highlight the rules and limitations of each language when it comes to representing empty slices, such as the use of nullptr in C++ and the unique representation in Rust. The author argues that the current rules pose safety and ergonomics problems, particularly for Rust’s FFI, and suggests potential solutions and improvements. They also mention the challenges and incompatibility in passing slices between C/C++ and Rust. The post provides a comprehensive explanation of the issue and offers recommendations for addressing them.
https://davidben.net/2024/01/15/empty-slices.html