blob: 5f56abb8d7bca75ceb41238d95529f0c248a7fe2 [file] [log] [blame] [view]
# Object-Oriented Programming Features
<!-- Old link, do not remove -->
<a id="object-oriented-programming-features-of-rust"></a>
Object-oriented programming (OOP) is a way of modeling programs. Objects as a
programmatic concept were introduced in the programming language Simula in the
1960s. Those objects influenced Alan Kays programming architecture in which
objects pass messages to each other. To describe this architecture, he coined
the term _object-oriented programming_ in 1967. Many competing definitions
describe what OOP is, and by some of these definitions Rust is object oriented
but by others it is not. In this chapter, well explore certain characteristics
that are commonly considered object oriented and how those characteristics
translate to idiomatic Rust. Well then show you how to implement an
object-oriented design pattern in Rust and discuss the trade-offs of doing so
versus implementing a solution using some of Rusts strengths instead.