A new Rust language design post from boxy (my ???): https://www.boxyuwu.blog/posts/an-incoherent-rust/

This is a complex topic, and as the post itself says, it is a bit "lacking in smallness". 100% worth digging into though if you're interested in #rust or the theory of programming language design.

TL;DR: coherence (which is responsible for the orphan rule about trait impls) causes problems with ecosystem lock-in. If we introduce the idea of named trait impls we might be able to do away with it!

An Incoherent Rust

Coherence and the orphan rules are a frequent source of complaints about Rust, and a common topic of language proposals. This post covers most of the existing proposals around coherence and my vision for how we should solve coherence once and for all.

@alice_i_cecile That's a great blog post. I've often been bothered by the whole serde/chrono/url/uuid feature soup that creeps into so many crates, and long thought that it would be so much more sensible if these could be implemented as separate crates somehow.

If I create my own crate with a type that would be natural to store into a sql BLOB, it feels ridiculous to try to upstream a ToSql impl on my own type into rusqlite, or to make a rusqlite dependency just to impl ToSql, even if they're behind feature flags. It makes much more sense if anybody can make crate alpha, anybody can make crate beta, and anybody can make crate alpha-beta containing impls between their types and traits.

The orphan and coherency rules are good rules, but they are really restricting, and I think Boxy's idea of named impls looks very natural and intuitive for people already familiar with Rust.