3 ms·
>What are the differences? As you mentioned, if they based it entirely on C# , it will be a unified type system. We'll only get more information when they rele
by ksk 13y ago
>What are the differences?
As you mentioned, if they based it entirely on C# , it will be a unified type system. We'll only get more information when they release a standards specification.
>Rust is about zero-cost abstractions, period.
Um.. no? For one, the heap is reference counted - and if you use std::gc its... mark/sweep(not sure?). This obviously means that the programmer has little control over memory allocation other than what can be afforded by not compromising memory safety. Secondly from my initial use of Rust I dont think you cannot protect a chunk of data with a lock and share it (w/o copying) across threads/processes as you would with a systems language like C++.
--
Rust is not aimed at high performance applications - I dont see anything wrong with that statement.
- ben0x539 13y agoYou'll have to take the word of the people aiming rust, really. Refcounted pointers are just one option in rust. ~Obviously~ you can use anything from C-style pointers and your own custom allocator that calls brk() directly to atomically refcounted and/or mutexed threadsafe smartpointers to manage your memory.
- ksk 13y agoIf you use a C style pointer, it is no longer an abstraction. I don't see what your point is.
- pcwalton 13y ago> For one, the heap is reference counted - and if you use std::gc its... mark/sweep(not sure?). No, the heap primarily uses unique ownership, which is equivalent to malloc/free. Reference counting is an option (and mark/sweep in the future) but idiomatic Rust only uses reference counting where it is necessary. > Secondly from my initial use of Rust I dont think you cannot protect a chunk of data with a lock and share it (w/o copying) across threads/processes as you would with a systems language like C++. Yes, you can. http://static.rust-lang.org/doc/master/extra/arc/struct.MutexArc.html http://static.rust-lang.org/doc/master/extra/arc/struct.Mute... > Rust is not aimed at high performance applications - I dont see anything wrong with that statement. Rust is aimed at high performance applications and has been since day one.
- ksk 13y agoSo are you confirming or denying that Rust is about zero-cost abstraction? Because it sounds like you're saying if you don't use any abstractions, its zero cost :) Anyway, I don't have anything against Rust. I cheer for their success.