Skip to content

Commit 33e1b57

Browse files
lucasvegijosevalim
authored andcommitted
Additional remarks for maintaining research history (#13078)
Similar to what we had already done with other anti-patterns that changed names
1 parent 8920cc1 commit 33e1b57

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/elixir/pages/anti-patterns/design-anti-patterns.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ end
186186

187187
A common practice followed by the community is to make the non-raising version return `{:ok, result}` or `{:error, Exception.t}`. For example, an HTTP client may return `{:ok, %HTTP.Response{}}` on success cases and `{:error, %HTTP.Error{}}` for failures, where `HTTP.Error` is [implemented as an exception](`Kernel.defexception/1`). This makes it convenient for anyone to raise an exception by simply calling `Kernel.raise/1`.
188188

189+
#### Additional remarks
190+
191+
This anti-pattern was formerly known as [Using exceptions for control-flow](https://github.com/lucasvegi/Elixir-Code-Smells#using-exceptions-for-control-flow).
192+
189193
## Primitive obsession
190194

191195
#### Problem
@@ -294,6 +298,10 @@ The following arguments were given to MyLibrary.foo/1:
294298
my_library.ex:2: MyLibrary.foo/1
295299
```
296300

301+
#### Additional remarks
302+
303+
This anti-pattern was formerly known as [Working with invalid data](https://github.com/lucasvegi/Elixir-Code-Smells#working-with-invalid-data).
304+
297305
## Unrelated multi-clause function
298306

299307
#### Problem

0 commit comments

Comments
 (0)