Rust (programming language): Difference between revisions

 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Rust is a low-level programming language. It's main advantage is supposed to be memory safety by default.   
Rust is a low-level programming language.
Recently, Rust has been adopted to many systems applications such as the Linux kernel drivers and Android.
The main advantage is that it encourages memory-safe programming through reference ownership and by isolating memory-unsafe functions.   


==Usage==
==Usage==
Line 48: Line 48:


===Borrowing===
===Borrowing===
This is like references in C++.
This is like references or <code>unique_ptr</code> in C++.
<syntaxhighlight lang="rust">
<syntaxhighlight lang="rust">
let x = 5;
let x = 5;