Satoshi Nakamoto Blog
Image default

What is the Rust language? Safe, fast, and easy software development

Fast, safe, easy to write—pick any two. That’s been the state of software development for a good long time now. Languages that emphasize convenience and safety tend to be slow (like Python). Languages that emphasize performance tend to be difficult to work with and easy to blow off your feet with (like C and C++).

Can all three of those attributes be delivered in a single language? More important, can you get the world to work with it? The Rust language, originally created by Graydon Hoare and currently sponsored by Mozilla Research, is an attempt to do just those things. (The Google Go language has similar ambitions, but Rust aims to make as few concessions to performance as possible.)

Rust is meant to be fast, safe, and reasonably easy to program in. It’s also intended to be used widely, and not simply end up as a curiosity or an also-ran in the language sweepstakes. Good reasons abound for creating a language where safety sits on equal footing with speed and development power. After all, there’s a tremendous amount of software—some of it driving critical infrastructure—built with languages where safety wasn’t the first concern.

Rust programming language advantages

Rust started as a Mozilla research project partly meant to reimplement key components of the Firefox browser. A few key reasons drove that decision: Firefox deserved to make better use of modern, multicore processors; and the sheer ubiquity of web browsers means they need to be safe to use.

But those benefits are needed by all software, not just browsers, which is why Rust evolved into a language project from a browser project. Rust accomplishes its safety, speed, and ease of use through the following characteristics.

Rust is fast

Rust code compiles to native machine code across multiple platforms. Binaries are self-contained, with no runtime, and the generated code is meant to perform as well as comparable code written in C or C++.

Rust is memory safe

Rust won’t compile programs that attempt unsafe memory usage. Most memory errors are discovered when a program is running. Rust’s syntax and language metaphors ensure that common memory-related problems in other languages—null or dangling pointers, data races, and so on—never make it into production. The compiler flags those issues and forces them to be fixed before the program ever runs.

Rust is low-overhead

Rust controls memory management via strict rules. Rust’s memory-management system is expressed in the language’s syntax through a metaphor called ownership. Any given value in the language can be “owned,” or held and manipulated, only by a single variable at a time.

Source link

Related posts

Britain and EU to hold last-ditch Brexit talks as deadline looms


Global insights platform Atheneum plants 73 trees a day in bid to tackle global deforestation 


HuffPost is now a part of Oath


Russian Lender VTB Patents Blockchain Payment Technology


End Loan Definition


How Apple’s $1 trillion market cap compares to the biggest firms