|
|
|
@ -15,17 +15,18 @@ All of these solutions work together to solve a bigger problem.
|
|
|
|
|
## 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/index.md) are methods to solve common problems when writing software.
|
|
|
|
|
|
|
|
|
|
[Anti-patterns](./anti_patterns/index.md) are methods to solve these same common problems.
|
|
|
|
|
|
|
|
|
|
However, while design patterns give us benefits, anti-patterns create more problems.
|
|
|
|
|
|
|
|
|
|
[Idioms](./idioms/index.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.
|
|
|
|
|
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/index.md) are methods to solve common problems
|
|
|
|
|
when writing software.
|
|
|
|
|
- [Anti-patterns](./anti_patterns/index.md) are methods to solve these same
|
|
|
|
|
common problems. However, while design patterns give us benefits,
|
|
|
|
|
anti-patterns create more problems.
|
|
|
|
|
- [Idioms](./idioms/index.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.
|
|
|
|
|
|
|
|
|
|
TODO: Mention why Rust is a bit special - functional elements, type system, borrow checker
|
|
|
|
|