News for hackers. Stuff that matters.
Re:Removing garbage collection from the Rust language by jhasse on Monday June 03, 2013 @05:14AM (#5812169)
"This could be fixed by switching to keywords, which I prefer for this reason"

~ could be named unique_ptr and @ something like shared_ptr. Genius!

Re:Removing garbage collection from the Rust language by anonymous on Monday June 03, 2013 @05:25AM (#5812206)
Or maybe we could allow types or type annotations to be written using only non-alphabetic characters and then ~ could be ~ and @ something like @ and my fingers won't break from typing. I do prefer having sigils for types that enrich other types to make them obviously different from types that are parametrized by another. Compare ~string to list<string> - the first is a uniquely owned string, the second is a list of string. ~ is an adjective and list is a noun. ~string is a string with such-and-such memory semantics; list<string> is a list that happens to contain strings.
Re:Removing garbage collection from the Rust language by dbaupp on Monday June 03, 2013 @06:53AM (#5812477)
One of the best bits of Rust is the low syntactic noise of ~T instead of unique_ptr<T>, since it's so common. (And similarly with @, which is less common, except in the compiler itself, where it is used all the time.)

Maybe I'm exaggerating a bit, but it really seems to work well after using it for a little.

Re:Removing garbage collection from the Rust language by bjz_ on Monday June 03, 2013 @10:24AM (#5813427)
I agree with you on that. It's a tad intimidating at first, but if you go with the flow you find it really cuts down on the noise. I'm surprised so many folks are arguing the opposite, to be honest.
Re:Removing garbage collection from the Rust language by zxcdw on Monday June 03, 2013 @12:38PM (#5814211)
I felt opposed to ~ and @ first, before I got really exposed to using them myself again and again.
Re:Removing garbage collection from the Rust language by pjmlp on Monday June 03, 2013 @01:19PM (#5814491)
Me too. I used to refer to them as Perlisms in Rust, but nowadays I don't care any longer.
Re:Removing garbage collection from the Rust language by copx on Monday June 03, 2013 @05:33AM (#5812222)
..or given that they like 1970s style abbreviated identifiers so much: "upt" and "spt"

Looking forward to writing: "let mut foo = upt .."

Re:Removing garbage collection from the Rust language by pcwalton on Monday June 03, 2013 @11:47AM (#5813913)
I don't really care for excessive use of abbreviation myself. I would prefer "heap" and "Gc".
Re:Removing garbage collection from the Rust language by cpeterso on Monday June 03, 2013 @01:45PM (#5814633)
If you like really short names, Android's RefBase.h declares `class sp` for "strong pointers" (like std::shared_ptr) and `class wp` for "weak pointers" (like std::weak_ptr).