LitMy.ru - литература в один клик

Effective Rust: 35 Specific Ways to Improve Your Rust Code

  • Добавил: literator
  • Дата: 15-04-2024, 05:30
  • Комментариев: 0
Название: Effective Rust: 35 Specific Ways to Improve Your Rust Code
Автор: David Drysdale
Издательство: O’Reilly Media, Inc.
Год: 2024
Страниц: 296
Язык: английский
Формат: pdf (true), epub
Размер: 10.1 MB

Rust's popularity is growing, due in part to features like memory safety, type safety, and thread safety. But these same elements can also make learning Rust a challenge, even for experienced programmers. This practical guide helps you make the transition to writing idiomatic Rust—while also making full use of Rust's type system, safety guarantees, and burgeoning ecosystem.

If you're a software engineer who has experience with an existing compiled language, or if you've struggled to convert a basic understanding of Rust syntax into working programs, this book is for you. By focusing on the conceptual differences between Rust and other compiled languages, and by providing specific recommendations that programmers can easily follow, Effective Rust will soon have you writing fluent Rust, not just badly translated C++.

In the crowded landscape of modern programming languages, Rust is different. Rust offers the speed of a compiled language, the efficiency of a non-garbage-collected language, and the type safety of a functional language—as well as a unique solution to memory safety problems. As a result, Rust regularly polls as the most loved programming language.

The strength and consistency of Rust’s type system means that if a Rust program compiles, there is already a decent chance that it will work—a phenomenon previously observed only with more academic, less accessible languages such as Haskell. If a Rust program compiles, it will also work safely.

This safety—both type safety and memory safety—does come with a cost, though. Despite the quality of the basic documentation, Rust has a reputation for having a steep on-ramp, where newcomers have to go through the initiation rituals of fighting the borrow checker, redesigning their data structures, and being befuddled by lifetimes. A Rust program that compiles may have a good chance of working the first time, but the struggle to get it to compile is real—even with the Rust compiler’s remarkably helpful error diagnostics.

• Understand the structure of Rust's type system
• Learn Rust idioms for error handling, iteration, and more
• Discover how to work with Rust's crate ecosystem
• Use Rust's type system to express your design
• Win fights with the borrow checker
• Build a robust project that takes full advantage of the Rust tooling ecosystem

Who This Book Is For:
This book tries to help with these areas where programmers struggle, even if they already have experience with an existing compiled language like C++. As such—and in common with other Effective books—this book is intended to be the second book that a newcomer to Rust might need, after they have already encountered the basics elsewhere—for example, in The Rust Programming Language (Steve Klabnik and Carol Nichols, No Starch Press) or Programming Rust (Jim Blandy et al., O’Reilly).

Скачать Effective Rust: 35 Specific Ways to Improve Your Rust Code












[related-news] [/related-news]
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.