4 ms·
Re: "buried behind a lot of clutter" If your code has a lot of clutter it's usually telling you something about your design. For readability a better way of h
by depsypher 12y ago
Re: "buried behind a lot of clutter"
If your code has a lot of clutter it's usually telling you something about your design.
For readability a better way of handling it might be for the function could return a boolean instead of an int:
if (is_valid(param1, param2)) {
self documenting code and all that.
- Peaker 12y agoYou're assuming the information being returned is a boolean. As a static typing fanatic, I would not return an int to indicate a boolean result. if (0 == number_of_students(context, classroom))