{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicdyf72k2erjsr6r3titblfoebqbwut2dccel6ke7uhm4zhzdl6mq",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mieggvi2zyv2"
  },
  "path": "/t/yet-another-half-baked-idea-for-working-around-the-orphan-rule/24121#post_2",
  "publishedAt": "2026-03-31T03:17:06.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "I can't find it right now, but I'm pretty sure I've seen a proposal here on IRLO that is similar to this, but you would indicate which traits are being impl right in the type. I guess the syntax was something like `type HashedMyType = MyType impl Hash = myimpl` for a variant of `MyType` that uses a named impl of `Hash`, or something like that\n\nAnyway both proposals are equivalent to newtype pattern, only with less boilerplate. Which is great news, since the downside of the newtype pattern is the huge amounts of boilerplate\n\nHowever I think that boilerplate when defining the newtype is tolerable. What really sucks is wrapping/unwrapping types when _using_ the types. That's what prevents me from using `NonZero*` types for example. So I think you need to have something to offer in this front.\n\nAlso, a small comment on syntax. I think that using punctuation in `Type\\foo` isn't a good tradeoff. That's an uncommon feature and deserves a self-explanatory contextual keyword. Maybe reusing the pattern types syntax like `Type is foo` would work (if `foo` is an identifier this builds a faceted type, if it's a pattern with literals it forms pattern type. And maybe unify both concepts under a generalization). Or something like `Type facet foo`",
  "title": "Yet another half-baked idea for working around the orphan rule"
}