Skip to content

Write about how coherence makes it nearly impossible to establish standard traits outside of libstd. #180

@nikomatsakis

Description

@nikomatsakis

Brief summary

Write about how coherence makes it nearly impossible to establish standard traits outside of libstd.

In a nutshell:

  • If I define a trait that (say) all runtimes should implement, they obviously won't implement it yet; typically I then have to implement it for them, because they don't want to implement some Random Joe's trait;
  • at that point, my trait crate depends on all the runtime crates (albeit with optional features, presumably);
  • now those runtimes can't depend on my trait, so they can't implement it, even if they wanted to!

It's sort of a chicken-and-egg problem that seems like it would be quite hard to get around.

Optional details

  • (Optional) Which character(s) would be the best fit and why?
    • Alan: the experienced "GC'd language" developer, new to Rust
    • Grace: the systems programming expert, new to Rust
    • Niklaus: new programmer from an unconventional background
    • Barbara: the experienced Rust developer
  • (Optional) Which project(s) would be the best fit and why?
    • List some projects here.
  • (Optional) What are the key points or morals to emphasize?
    • Write some morals here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions