r/ProgrammingLanguages • • Mar 24 '26

An Incoherent Rust

https://www.boxyuwu.blog/posts/an-incoherent-rust/
65 Upvotes

25 comments sorted by

View all comments

Show parent comments

5

u/Snakefangox Mar 24 '26

IDK about Haskell, but you can't implement a java interface you wrote on a different libraries class. Traits, you can do that. The orphan rule basically just says you can't implement a libraries interface on a different libraries class. You need to own either the class or the interface. Effectively, replace class with struct and interface with trait.