Skip to content

Commit

Permalink
patterns: remove TODO item (rust-unofficial#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoieni authored Apr 4, 2022
1 parent 7873566 commit 465ed6c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions patterns/index.md
Original file line number Diff line number Diff line change
@@ -18,14 +18,11 @@ whole classes of problems. Some of them are also patterns that are _unique_ to R

## YAGNI

If you're not familiar with it, YAGNI is an acronym that stands for
`You Aren't Going to Need It`. It's an important software design principle to apply
as you write code.
YAGNI is an acronym that stands for `You Aren't Going to Need It`.
It's a vital software design principle to apply as you write code.

> The best code I ever wrote was code I never wrote.
If we apply YAGNI to design patterns, we see that the features of Rust allow us to
throw out many patterns. For instance, there is no need for the [strategy pattern](https://en.wikipedia.org/wiki/Strategy_pattern)
in Rust because we can just use [traits](https://doc.rust-lang.org/book/traits.html).

TODO: Maybe include some code to illustrate the traits.

0 comments on commit 465ed6c

Please sign in to comment.