In beancount, the accounting equation is Expense+Income+Equity=0 and all signs are always left intact (there is only addition).
So you start a company with a seed capital of $5. You borrow $5 to the bank, buy an expensive apple for $10, sell it for $15 and give the money back to the bank with an interest of $1, then close the exercise and carry the profits (don't distribute dividends). Your ledger is:
Initial capital
Assets:Cash +5 USD
Equity:Seed -5 USD
Borrow to the bank
Assets:Cash +5 USD
Liabilities:Bank -5 USD
Buy an apple
Assets:Apples +10 USD
Assets:Cash -10 USD
Sell the apple
Income:Sales -5 USD
Assets:Apples -10 USD
Assets:Cash +15 USD
Reimburse the bank
Liabilities:Bank +5 USD
Expenses:Interest +1 USD
Assets:Cash -6 USD
Close the exercise # beancount does that for you for any time period btw
Expenses:Interest -1 USD
Income:Sales +5 USD
Equity:PreviousProfit +4 USD
Notice how every transaction balances to 0 just by summing it, no need to remember anything.Now, you're at the beginning of the next exercise. To know your accounts you just compute a sum of every operation to it, again no special case. So your accounts are:
Expenses 0 USD
Income 0 USD # as expected at beginning of exercise
Assets:Apples 0 USD
Assets:Cash 9 USD
Liabilities:Bank 0 USD
Equity:Seed -5 USD
Equity:PreviousProfits -4 USD
And yet again, the sum of all of that is 0.Personally I like it, not having any special cases. Yes, it may confused an accountant (because they learned the special cases by heart ! Somebody coming with a fresh mind has no reason to be confused, it's all just conventions !) but it's simpler for me and just as consistent.
I think OP is encoding the sign-reversal internally though, right? It "displays" the two incorrectly classified account types exactly per the standard convention instead of re-applying the convention at every operation. All reports would follow the 'Classic' conventions. At least that was my reading!