]>
Commit | Line | Data |
---|---|---|
13cf67c4 XL |
1 | # Object Oriented Programming Features of Rust |
2 | ||
3 | Object-oriented programming (OOP) is a way of modeling programs. Objects came | |
4 | from Simula in the 1960s. Those objects influenced Alan Kay’s programming | |
5 | architecture in which objects pass messages to each other. He coined the term | |
6 | *object-oriented programming* in 1967 to describe this architecture. Many | |
7 | competing definitions describe what OOP is; some definitions would classify | |
8 | Rust as object oriented, but other definitions would not. In this chapter, | |
9 | we’ll explore certain characteristics that are commonly considered object | |
10 | oriented and how those characteristics translate to idiomatic Rust. We’ll then | |
11 | show you how to implement an object-oriented design pattern in Rust and discuss | |
12 | the trade-offs of doing so versus implementing a solution using some of Rust’s | |
13 | strengths instead. |