News for hackers. Stuff that matters.
Re:Using Rust for an Undergraduate OS Course by ijl on Friday January 03, 2014 @09:08PM (#7009591)
Can anyone elaborate on how "Rust changes the way you think"?
Re:Using Rust for an Undergraduate OS Course by lifthrasiir on Friday January 03, 2014 @09:27PM (#7009662)
With Rust you need to be explicit about everything's lifetime. You cannot allocate some chunk of memory and freely borrow it; when borrowing you need a certificate (i.e. compiler check) that the borrowed reference has a shorter lifetime than that of the referenced memory. It is tremendously different from the absence of such guarantees (like C) or the GC-based weak guarantees (like Java and Go, which does not solve the logical memory leaks anyway [1]).

[1] Not that Rust completely solves the logical memory leaks, but it makes the leaks explicit.

Re:Using Rust for an Undergraduate OS Course by oscargrouch on Friday January 03, 2014 @11:56PM (#7010015)
c++ smart pointers under the hood? its actually cool.. to bake some of this directly in the language.. can prevent some memory copying by playing with raw pointers indirections under the hood in the lang runtime, etc..

But you already has to think like this when you use smart pointers in C++.. "who owns this reference?" etc..

But in C++ this is a library.. not a syntax.. point to rust for this

Re:Using Rust for an Undergraduate OS Course by sanxiyn on Saturday January 04, 2014 @02:05AM (#7010325)
You already have to think like this when you use smart pointers in C++! But C++ compilers don't help you with that! The Rust compiler does. Using Rust, you get surprised how often you get ownership wrong, because the compiler tells you every time. The same analogous code in C++ will still be wrong, but you wouldn't know, since the compiler tells you zilch.
Re:Using Rust for an Undergraduate OS Course by carterschonwald on Saturday January 04, 2014 @03:22AM (#7010465)
hello sanxiyn! (fyi all, sanxiyn is one of the rust compiler developers, unless i'm mixing up names :) )
Re:Using Rust for an Undergraduate OS Course by dbaupp on Saturday January 04, 2014 @06:39AM (#7010766)
(There are quite a few of us in this thread, fwiw: brson and pcwalton are Mozilla employees working on Rust and Servo; sanxiyn, bjz_, steveklabnik and I are volunteers, just from the handles I recognise.)
Re:Using Rust for an Undergraduate OS Course by kibwen on Saturday January 04, 2014 @01:26PM (#7012217)
sanxiyn is actually a Samsung employee, and on their behalf has contributed to Rust in the past. IIRC he's not currently employed to work on Rust, though he's still an active community member.