-
Book Overview & Buying
-
Table Of Contents
The Rust Programming Handbook
By :
Welcome to Chapter 8!
In previous chapters, we’ve enjoyed exploring Rust’s core features like ownership and error handling together. Now, let’s warmly dive into how concepts from Object-Oriented Programming (OOP) connect with Rust.
Although Rust isn’t a traditional OOP language like Java or C++, you’ll discover that it thoughtfully includes many of the same principles, all woven into its own unique, safety-focused approach to achieving object-oriented goals.
This distinctive approach isn’t by chance; it’s a natural result of Rust’s motivations: ensuring memory safety without a garbage collector, enabling fearless concurrency by preventing data races, and delivering performance comparable to C.
These foundational goals have guided specific design decisions, such as choosing traits for shared behavior instead of traditional inheritance.