You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
patterns/intro.md

22 lines
1.4 KiB
Markdown

9 years ago
# Introduction
## Design patterns
When developing programs, we have to solve many problems. A program can be viewed as a solution to a problem. It can also be viewed as a collection of solutions to many different problems. All of these solutions work together to solve a bigger problem.
9 years ago
## Design patterns in Rust
There are many problems that share the same form. Due to the fact that Rust is not object-oriented design patterns vary with respect to other object-oriented programming languages. While the details are different, since they have the same form they can be solved using the same fundamental methods.
[Design patterns](patterns/README.md) are methods to solve common problems when writing software.
[Anti-patterns](anti_patterns/README.md) are methods to solve these same common problems.
However, while design patterns give us benefits, anti-patterns create more problems. There are some problems that we don't need to solve because [Rust rocks](rust_rocks.md)!
[Idioms](idioms/README.md) are guidelines to follow when coding. They are social norms of the community.
You can break them, but if you do you should have a good reason for it.
[Refactoring](refactoring/README.md) is the process by which you convert code that works, but is hard to understand, into code that works and is easy to understand.
TODO: Mention why Rust is a bit special - functional elements, type system, borrow checker