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