That's way too ambiguous, how will anyone understand what that function does? You need to use Propertm programming style
/* First, check if the value is true. There are only two possibilities for this value in this language, true or false. This value is stored in the 'val' field, and since it is a Boolean we can compare it to true and false using the equality operator, like so: */
if (val == true) {
/* Then we know this value is true, so return true. This will exit the function.
return true;
} else if (val == false) {
/* If the value fails the previous check, then we know that it is not true. If it passed this check, then we now know that it is false, so we then return false.
return false;
}
// TODO: unit test so we know for sure that this function returns true if the value is true and false if the value is false.
Nononono you can't just pass in the parameter, think of how improper (TM) that is. You need to pass it in through dependency injection, create an IManagerServiceFactory to take care of it for you instead
It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.
For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.
villi_, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.
129
u/INeedAFreeUsername Jun 23 '20