Timeline for C# convention for empty constructor
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 25, 2021 at 17:08 | comment | added | John Wu |
I like the idea of being explicit about emptiness. To my team, side-by-side braces { } is an indication of explicit emptiness and can be quickly recognized by the eye. It's okay if your team is different though.
|
|
| Mar 25, 2021 at 15:13 | comment | added | Theraot | @Flater I don't want to wait for tests to run to discover I should not have removed this code block. And put me on the bad developers, because I began doing this for myself. I guess I should be writing more comments then. | |
| Mar 25, 2021 at 10:17 | comment | added | Flater | The last paragraph seems to gloss over the strongly suggested existence of tests ("if removing it does not break the build") and that developers shouldn't need explicit explanation to understand that calling a base constructor isn't superfluous code that "does nothing". If such a level of developer guidance is needed, then you're going to have to explicitly explain many things in your codebase, and comments are not the best teaching tool to ensure your developers have a general understanding of the language. | |
| Mar 25, 2021 at 8:29 | vote | accept | dolgom | ||
| Mar 25, 2021 at 6:17 | history | answered | Theraot | CC BY-SA 4.0 |