Our great sponsors
-
Besides Go's many other problems optimizing CPU-bound work, the Go runtime isn't even designed for it. Many people would be appaled to learn that to stop CPU-heavy goroutines from starving IO reaction goroutines, Go will just use thread signals to preempt the CPU-bound work (source). In Rust you can get a real native thread ID to use for things like priority, core pinning, thread-local storage, P/E QoS, etc. while with Go you have no real sanctioned way to control anything at all about your goroutines much less how the runtime manages their underlying threads.
-
ffi-overhead
comparing the c ffi (foreign function interface) overhead on various programming languages
Go doesn't even have native thread stacks. When call any FFI function Go has to switch over to an on-demand stack and coordinate the goroutine and the runtime to avoid preemption and starvation. This is part of why Go's calling overhead is over 30x slower than C/C++/Rust (source). It's understandbly become Go community culture to act like FFI is just not even an option and reinvent everything in Go, but that reinvented Go suffers from these other problems plus many more (such as optimizing far worse than GCC or LLVM).
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
In python bugs around async are still discovered like this recent fix: https://github.com/python/cpython/pull/96323 tl;dr : launching a background task without keeping a reference to it could lead to get the task garbage collected before completion. And even a python contributor fell for it. The documentation for create_task was only clarified recently.
-
I have had excellent success with this approach when implementing the Raft algorithm. Raft involves a complex state machine that uses several notionally "asynchronous" operations (sending/receiving messages, storing/loading data from disk, triggering events on timeouts). But that doesn't mean that it needs to be async. For example, instead of having the user of the crate implement a "Storage" trait with asychronous methods, it simply returns a list of the storage operations that must be executed. The caller is free to execute these however they want, sync or async. Traits are a convenient tool for polymorphism, but are not the only one, and will frequently lead to ugly/complex architectures when combined with async.
-
I think this is something that iced is doing really well (which is inspired by elm which damn near did it perfectly, imo).
-
I think this is something that iced is doing really well (which is inspired by elm which damn near did it perfectly, imo).
-
Just to add a bit to your explaination about how much control Rust async gives you: Embassy
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.