News for hackers. Stuff that matters.
Re:Announcing Rust 1.0 Alpha by Solarsail on Friday January 09, 2015 @09:12PM (#8865598)
Haven't used Rust, but I wonder what you could use in place of the phantom types? Are Traits capable of filling this role? Am I completely misreading what Traits are?

Can Rust still do phantom types, and I just can't see them anywhere in the language reference?

Re:Announcing Rust 1.0 Alpha by xKingfisher on Friday January 09, 2015 @09:32PM (#8865641)
You should still be able to use phantom types with empty traits or enums. Here's an article[0] (admittedly from ~6 months ago), about using phantom types in Servo.

[0] https://blog.mozilla.org/research/2014/06/23/static-checking...

Re:Announcing Rust 1.0 Alpha by Jweb_Guru on Friday January 09, 2015 @09:19PM (#8865607)
Rust can still do phantom types.

    struct Foo<T>; // `T` is a phantom type parameter.
Re:Announcing Rust 1.0 Alpha by vedosity on Saturday January 10, 2015 @03:05PM (#8867739)
Phantom types aren't part of the language because they don't need to be. They're just empty types used as type parameters for structs, where the type parameter isn't actually used as a variable in the struct. It is more of a design pattern than a language feature.
Re:Announcing Rust 1.0 Alpha by vhbit on Saturday January 10, 2015 @12:39AM (#8866042)
Yes, you can read a bit about collections and how phantom types are used in them http://cglab.ca/~abeinges/blah/rust-btree-case/