Viewing a single comment thread. View all comments

twovests OP wrote

tbh I didn't know about 'class invariants' until just now, but Wow these all Hurt to Read

1

Moonside wrote (edited )

If I was an instructor on some software course, I'd make an online assignment to come up with 5 excuses for not writing documentation and share the best answers with the class afterwards.

Class invariants are imo cool and underappreciated part of OOP. It's also my belief, untainted by any real research though, that designing, verifying and testing them would kill lots of bugs.

2