Rust a safe, concurrent, practical language
Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries – both abstract and operational – that preserve large-system integrity, availability and concurrency.
It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and metaprogramming, in both static and dynamic styles.
A short summary of features
Compilation model | batch, ahead-of-time, C/C++ compatible |
Type system | static, structural-algebraic, with metadata |
Type inference | yes, only local variables |
Generic types | yes, only simple, non-turing-complete substitution |
Concurrency | isolated tasks, message passing |
Unique pointers | move semantics, no races or sharing |
Memory safety | no buffer overflow, use before init, NULL or free() |
Immutability | immutable by default, mutability is the special case |
Garbage collection | optional, per-task, only "shared" types |
Error handling | isolated tasks, unrecoverable unwinding |
Text | utf8 strings, ucs4 characters |
Tier 1 platforms | Linux, OSX, Windows |
Developers | Mozilla |
License | MIT |
A very small taste of what it looks like
use std; import std::io; fn main() { for i in [1, 2, 3] { io::println(#fmt("hello %d\n", i)); } }