Skip to content

Commit

Permalink
Add prefer named arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsoncusack committed Apr 12, 2024
1 parent 648ff60 commit 1ccde94
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,22 @@ For example

ASCII art is permitted in the space between the end of the Pragmas and the beginning of the imports.

#### 13. Prefer named arguments.

Passing arguments to functions, events, and errors with explicit naming is helpful for clarity, especially when the name of the variable passed does not match the parameter name.

NO:

```
pow(x, y, v)
```

YES:

```
pow({base: x, exponent: y, scalar: v)
```

## 2. Development

### A. Use [Forge](https://github.com/foundry-rs/foundry/tree/master/crates/forge) for testing and dependency management.
Expand Down

0 comments on commit 1ccde94

Please sign in to comment.