Assignment 1: Extend feedback

This commit is contained in:
Alex Hirsch 2020-11-26 13:45:20 +01:00
parent 168884fab2
commit b661fea4a7

View File

@ -103,6 +103,10 @@
- A library function should never terminate the whole application. - A library function should never terminate the whole application.
- Throw a custom error indicating failure, or resort to `std::runtime_error`. - Throw a custom error indicating failure, or resort to `std::runtime_error`.
- Libraries should not directly use `stdin` / `stdout` / `stderr`
- Input / output should always be done via function arguments / return value.
- Use some configurable logging mechanism.
- Use `enum class` over `enum`, over preprocessor define - Use `enum class` over `enum`, over preprocessor define
- `enum class` gets type-checked and is therefore preferred. - `enum class` gets type-checked and is therefore preferred.
- `enum` is still valid as it allows you to combine multiple members out-of-the-box (flag enum). - `enum` is still valid as it allows you to combine multiple members out-of-the-box (flag enum).
@ -131,6 +135,11 @@
- Do not use this pattern yourself, it's often unnecessary. - Do not use this pattern yourself, it's often unnecessary.
- Putting stuff into a `detail` or `anonymous` namespace is the way to go. - Putting stuff into a `detail` or `anonymous` namespace is the way to go.
- Use Out-of-source builds
- Do not pollute your source files with build artifacts.
- Out-of-source builds allow you to have different build configurations side-by-side.
- Build folders should not be tracked by your version control system (use `.gitignore`).
## Project structure ## Project structure
### Single Library ### Single Library