News for hackers. Stuff that matters.
Re:A Week with Mozilla's Rust by mcpherrinm on Wednesday August 21, 2013 @10:37PM (#6254778)
Rust does have some new syntax, but I think most of it is justified for making programming in it nicer.

The `~[u8]` would be written `std::unique_ptr<u8>` in C++. They're used everywhere in Rust, and having to write out unique_ptr would get awfully tiresome.

The `acc` on its own line is a result of "the last statement gets returned" like many functional languages do. If you were writing C++, you'd write `return acc;` instead. This one is more of a convenience, and you could get away without it.

Re:A Week with Mozilla's Rust by masklinn on Thursday August 22, 2013 @08:11AM (#6256602)
> The `~[u8]` would be written `std::unique_ptr<u8>` in C++.

Wouldn't it be `std::unique_ptr<std::vector<u8>>`?

Re:A Week with Mozilla's Rust by mcpherrinm on Friday August 23, 2013 @12:41AM (#6261750)
Indeed, it would.
Re:A Week with Mozilla's Rust by userulluipeste on Thursday August 22, 2013 @09:54AM (#6257115)
I agree that C++ broke the syntax terseness of C and become verbose for the sake of being explicit enough. This gets inconvenient sometimes, but the good thing is that it is a technical solvable problem - just redefine the long keywords or configure your editing tools to help you out typing.