From b661fea4a783ea806319200644df64281ab308e7 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Thu, 26 Nov 2020 13:45:20 +0100 Subject: [PATCH] Assignment 1: Extend feedback --- assignment1/feedback.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assignment1/feedback.md b/assignment1/feedback.md index a92e238..08b002a 100644 --- a/assignment1/feedback.md +++ b/assignment1/feedback.md @@ -103,6 +103,10 @@ - A library function should never terminate the whole application. - 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 - `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). @@ -131,6 +135,11 @@ - Do not use this pattern yourself, it's often unnecessary. - 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 ### Single Library