On Sun, Jul 14, 2013 at 5:31 PM, Alex Rozenshteyn <[email protected]>wrote:
> It's my understanding that Rust traits suffer fewer coherency issues than > Haskell type classes because Rust disallows orphan impls, so that in order > to implement a trait, either the trait or the data needed to be defined in > the same crate. > This is conceptually equivalent to the haskell rule that a type class instance must either be provided in the unit of compilation that introduces the type class or in the unit of compilation that introduces the type. That allows a check for non-overlapping instances, but it doesn't address the problem of instance resolution, e.g. for List<'a> vs List<char>. General aside: the Rust "reference" is exceptionally poor on describing behavior, rules, and restrictions. Jonathan
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
