Recently, I found myself struggling with a small annoyance related to struct field visibility and struct initialization in Rust. It’s no rocket science, but I thought about it long enough that I might as well turn it into a blog post.| Kobzol’s blog
Hello, and welcome to a new edition of Links lists! C++, Rust, Kubernetes and careers this week! Coding Optimizing C++ std::sort at Google scale The algorithm in the STL of C++ are very powerful and very widely used. This article is a very in-depth look at how and why Google modified the implementation of std::sort. The changes have been merged in LLVM and will be available to everyone soon. Changing Std::sort at Google’s Scale and Beyond TL;DR; We are changing std::sort in LLVM’s libcxx.| andreabergia.com
Dependency injection is one of my favorite design patterns to develop highly-testable and modular code. Unfortunately, applying this pattern by taking Rust traits as arguments to public functions has unintended consequences on the visibility of private symbols. If you are not careful, most of your crate-internal APIs might need to become public just because you needed to parameterize a function with a trait. Let’s look at why this happens and what we can do about it.| Julio Merino (jmmv.dev)