Skip to content

Prior Art #9

@Ixrec

Description

@Ixrec

C++/Java/C#: The closest analogue to traits is interfaces and/or abstract base classes, which must be part of a type's definition, so there's simply no such thing as "orphan impls".

Haskell: Orphan impls are allowed, and you simply get an error if you ever import incoherent impls. GHC does have an IncoherentInstances language extension that permits GHC to do magic to select an impl for you, but no one should ever use that.


Obviously, this is very incomplete. Please comment if you're familiar with how any other language handles these problems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions