News for hackers. Stuff that matters.
Re:Announcing Rust 1.0 Alpha by 12423gsd on Friday January 09, 2015 @05:19PM (#8864851)
Are "Traits" basically C++ Concepts?
Re:Announcing Rust 1.0 Alpha by adrusi on Friday January 09, 2015 @06:26PM (#8865139)
Somewhere between C++ concepts and Haskell typeclasses with a hint of Java interfaces.

But yes, their primary usage is to require that type parameters exhibit a certain set of properties.

Re:Announcing Rust 1.0 Alpha by nercury on Friday January 09, 2015 @05:54PM (#8865014)
For someone who knows C#, I would explain them as abstract extension methods that can be overriden for specific types.
Re:Announcing Rust 1.0 Alpha by bjz_ on Saturday January 10, 2015 @01:19AM (#8866135)
They fill the same role as concepts - ie. bringing type checking to the call site when using parametrized types, rather than using a duck typed approach, which leads to the big template stack traces that you get in C++.
Re:Announcing Rust 1.0 Alpha by steveklabnik on Friday January 09, 2015 @05:42PM (#8864958)
There are some technical details that make them different, if I recall correctly. But they're kinda similar. They're also close to Haskell's typeclasses.