LWN.net Logo

Rust-lang

Rust-lang

Posted Apr 6, 2013 0:26 UTC (Sat) by HelloWorld (guest, #56129)
In reply to: Rust-lang by jimparis
Parent article: Mozilla and Samsung building a new browser engine

> So imagine a case where both branches are different.
That's a type error in itself in most cases. In order for such code to typecheck, the branches' types must have a common supertype. As far as I can see, Rust allows only interfaces to form hierarchies, and I don't know if it's even possible for () to implement interfaces. But even if it is, this situation is going to be so rare that it's not worth losing any sleep over it.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds