loading...

re: What The For Loop? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: isOdd should not need to be a function

Hence "trivial examples are a bad basis for maintainability discussions". In the provided code there is no "elsewhere" so it really doesn't need to be a function at that time (YAGNI and all that, and Donald Knuth had strong opinions on this one too).

Anyway, in a language with a less poor standard library we wouldn't have to define simple functions to check an integer's parity, so I think this discussion has run its course.

code of conduct - report abuse