So say, imagine a system defining balance transfer...
# language-proposals
j
So say, imagine a system defining balance transfers. The premise is that you and I both have balance and a balance cannot be negative. I have a balance of 0, and I decide to send you 1. The transaction processes, but rather than throw an
OutOfMoney
exception, why not simply indicate a failure state. Its not exceptional to be out of money, its just an accepted failure. It would be exceptional if I tried to send you a cow, and the system only traded in "money"