Get the latest tech news

Blocking code is a leaky abstraction


Asynchronous code does not require the rest of your code to be asynchronous. I can’t say the same for blocking code.

async code is a little hard to wrap your head around, but that’s true with many other concepts in Rust, like the borrow checker and the weekly blood sacrifices. Many popular async libraries are explicitly tied to heavyweight crates like tokio and futures, which aren’t good picks for many types of programs. Not only is AppKit thread-unsafe to the point where many functions can only safely be called on the main() thread, it forces you into Apple’s terrifying Objective-C model.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of leaky abstraction

leaky abstraction

Photo of Blocking code

Blocking code

Related news:

News photo

Objective-C is just, like, a leaky abstraction over C