|
|
|
|
|
by gregorygoc
338 days ago
|
|
No, appropriate abstractions are insufficient for my argument. For example: there’s one way to write an idiomatic loop in C and it inherits necessary invariants by construction. I highly recommend reading the book, it explains concept of writing idiomatic code way better than I ever could. |
|
How do you idiomatically write a loop to iterate over signed ints from i to j (inclusive) in increasing order, given i <= j?
What does that loop do when j is INT_MAX?