2026-10-20 18:43 UTC
@pervognsen@mastodon.social @zwarich@hachyderm.io @slava@mathstodon.xyz Swift theoretically avoids this in its runtime model by treating typeclass requirements as separate parameters fulfilled by whatever conformance the compiler chooses, so if module A chooses String: Hashable with an implementation from module B, and module X chooses String: Hashable with an implementation from module Y, then A and X also get different Set types if they should ever meet. The type checker implementation has never quite lived up to that though
Replies (1)
-
@joe@f.duriansoftware.com 2026-10-20 18:48
@pervognsen@mastodon.social @zwarich@hachyderm.io @slava@mathstodon.xyz we also grew features later on that break the ability to keep incoherence contained or at least make it hard, like dynamic conformance lookups and same type constraints (since if you have `T: Foo and T == Bar` you also need to encode a `T: Foo == specific Bar: Foo implementation` constraint somehow, and check that against the universe)