News for hackers. Stuff that matters.
Re:Pointers in Rust: a guide by ww520 on Friday October 18, 2013 @02:52PM (#6573256)
Managed pointers are fine. The only problem I see is ~str and ~[] are managed pointers most of the time and that makes the code looks weird to people.

If we make str default to managed rather than ~str, and [] default to managed rather than ~[], most of the weird pointer complaints will go away.

Edit: Darn, what was I thinking? I meant owned pointer.

Strings or vectors are owned in most cases. That makes Rust code littered with ~str or ~[], especially when having vector of strings or vectors of vectors. ~[~[~str]]. If we make str and [] default to owned, the code would be much cleaner.

That means move the syntax for fixed vec to something else, like ![1,2,3]

Re:Pointers in Rust: a guide by pcwalton on Friday October 18, 2013 @02:54PM (#6573276)
I'm not sure what you mean. "String literals" are &str, not a managed string, and [1, 2, 3] syntax creates a fixed-length vector, not a managed one.
Re:Pointers in Rust: a guide by kibwen on Friday October 18, 2013 @03:03PM (#6573329)
Neither ~str nor ~[] are managed. Neither of those introduce any runtime overhead.