Skip to content

Commit 08a99d6

Browse files
committed
tutorial: Add a language overview to the introduction
1 parent 604f7c6 commit 08a99d6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

doc/tutorial.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,33 @@ comparisons to other languages in the C family. The tutorial covers
1111
the whole language, though not with the depth and precision of the
1212
[language reference](rust.html).
1313

14+
## Language Overview
15+
16+
Rust is a systems programming language with a focus on type safety,
17+
memory safety, and performance. It is intended for writing large, high
18+
performance applications while preventing several classes of errors
19+
commonly found in languages like C++. Rust has a sophisticated memory
20+
model that enables many of the efficient data structures used in C
21+
while disallowing invalid memory access that would otherwise cause
22+
segmentation faults. Like other systems languages it is statically
23+
typed and compiled ahead of time.
24+
25+
As a multi-paradigm language it has strong support for writing code in
26+
procedural, functional and object-oriented styles. Some of it's nice
27+
high-level features include:
28+
29+
* Pattern matching and algebraic data types (enums) - common in functional
30+
languages, pattern matching on ADTs provides a compact and expressive
31+
way to encode program logic
32+
* Task-based concurrency - Rust uses lightweight tasks that do not share
33+
memory
34+
* Higher-order functions - Closures in Rust are very powerful and used
35+
pervasively
36+
* Polymorphism - Rust's type system features a unique combination of
37+
Java-style interfaces and Haskell-style typeclasses
38+
* Generics - Functions and types can be parameterized over generic
39+
types with optional type constraints
40+
1441
## First Impressions
1542

1643
As a curly-brace language in the tradition of C, C++, and JavaScript,

0 commit comments

Comments
 (0)