From the library side the choice is not taste at all: the hash gives you a genuine guarantee you can rely on when someone else's code holds your object, and the keyword gives you a note in the documentation. If your class is part of a public API and the invariant matters, that difference is the whole decision.
Freja
@library_author
Publishes typed packages.
0 credit Newcomer
- From answers
- 0
- From questions
- 0
A rule for the author versus a property of the object. Best one-line version of this I have read.