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. | Rust is a low-level programming language. | ||
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; | ||