> non-lexical anti-collision
checks to manifest at runtime. So if we are going to admit non-lexical
> anti-collision requirements, we have to restrict the scope of those
items to some unit that is
> statically compiled and checked.
I have the impression that rust doesn't quite do that - rather, it prevents
clashes from occurring between crates at distance greater than 1 in some metric.
I don't fully understand rust coherency checking, but it
seems to me that they are not trying to rule out clashes entirely, but
to rule out clashes which couldn't have been known about ahead of time:
A
crate is allowed to define the implementation of a trait R for a type Y
if it defines either Y or R. So if cR is a crate defining R, and cY is a
create defining Y, then they could both define the impl of R for Y and
clash. I get the feeling that this is considered okay because one of the
crates must be a direct dependency of the other, and so the author of
the dependent must know what is exported by the other one. Whereas if
third party crates were allowed to define the impl, then they could clash
'innocently'.
Alex
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev