You are reading a draft of the next edition of TRPL. For more, go here.

Is Rust an Object-Oriented Programming Language?

Object-Oriented Programming is a way of modeling programs that originated with Simula in the 1960s and became popular with C++ in the 1990s. There are many competing definitions for what counts as OOP, and under some definitions, Rust is object-oriented; under other definitions, it is not. In this chapter, we’ll explore some characteristics that are commonly considered to be object-oriented and how those characteristics translate to idiomatic Rust. We’ll then show you how to implement an object-oriented design pattern in Rust and discuss the tradeoffs of doing so versus implementing a solution using some of Rust’s strengths instead.