From the course: Rust for C# Developers
What Rust is - Rust Tutorial
From the course: Rust for C# Developers
What Rust is
- [Instructor] Let's look at some of the basics of what Rust is as a language and the tooling you get along with it. Rust is statically typed just like C-Sharp, where you know the type of all instances you're working with at all times. Type Inference, which is found in C-Sharp through the keyword Var, is very central to Rust, and you seldom need to explicitly state the exact type you're working with, even if tooling helps you easily figure it out. Rust is an imperative language but with support for functional programming constructs, just like C-Sharp does with Lambdas. This means that you as a C-Sharp developer will recognize the structure of the code quite a lot, but that you can use the same powerful, functional constructs that C-Sharp introduced along its lifetime. One thing that sets Rust apart from many other languages but which also enables its very high performance is that it doesn't use garbage collection. Instead, Rust uses conventions in the language to manage allocation and the allocation of resources. Rust code compiles to machine code instead of intermediate language code, which is interpreted on the fly, like what is default in C-Sharp and .net applications. This also means that there is no need for any runtime to be installed on the machine, which is running the executable written in Rust. This results in fast startup times and small-sized executable files. Safe concurrences is another thing that the language conventions in Rust enable in a very reliable and predictable way. When we look at the history of Rust, we can clearly see that it's a modern programming language. Rust was announced by Mozilla in 2010, and version 1.0 of the language was released in 2015. To put things in perspective, this makes Rust 10 years younger than C-Sharp, 15 years younger than Java, and 25 years younger than C++. That Rust is younger than these established languages does not automatically mean that it has any benefits over them, but it does mean that it has had the chance to learn from pain points in these languages, and this could be a factor to why Rust is such a loved language by its developers.