What is Rust?

What is Rust?

  • 19 August 2022
  • Programming
  • Ditulis oleh Abdul Salam
  • 60 Views

A few days ago, had heard about this programming language for many times, so, exciting to hand-on for this one and decide to take a deep concept of it.

"It's multi-paradigm, general purpose programming language" - wiki
It means, Rust can be used for any kind of platform/layer, even useful for webAssembly, networking, game engine, file system, operating system and much more.
So, why Rust can perform all of that? how strong Rust is, what is the keys capability of it?

In terms of speed/performance, we have to acknowledge that C/C++ has the fastest compilations time among others for a long time, because it's has tight data structure (smaller things run faster due to cache) and metaprogramming (something related to low level language that closest to machine language), and the wowthing is due to benchmark and tests in some article and live sessions, Rust proven run faster than C/C++ (1).

Rust has the ability to enhance the memory, type safety, concurrency that differ from other languages, Rust DOESN'T use garbage collector (something to throw out unused variables) or reference counting concepts (store references, pointers, handlers as number), which 2 that things take a huge impact on the performance of language, instead Rust just pointing to valid memory so that there's unknown memory-unsafe in Rust, Rust manage it with very low overhead, and it's great point in term of speed, time and performance when we run/build app under Rust.

Rust also prevent data race (when 2 things run simultaneously to change some value of data), Rust handle data race using "checker tracks" from the object lifetime (when we create things until it's destroyed) and it's proven effective (2).

That's why, Microsoft and Mozilla actively using Rust as a system language, because it's syntaxes friendly, support for security code, safety better than C/C++, above the Go as language, can be treat as functional programming (same as python, js), efficient, and fastest (let's compare with Carbon later).

Take a look this simple code for getting started with Rust:
https://lnkd.in/gkTpNZqw

Note:
(1) https://lnkd.in/gGTAScJd

(2) https://lnkd.in/gPQ_3bxe)

#rust #programming #concept #code #security #networking