On Tue, Jul 1, 2014 at 9:53 PM, Simon Michael <[email protected]> wrote:
> On 7/1/14 6:23 PM, Martin Blais wrote: > >> A dedicated balance directive is also quite intuitive IMO. >> > > Yes, I agree. > > > Order invariance, and having balance assertions on postings or as >> separate directives, are mostly orthogonal issues I think. >> >> No... that's exactly the problem I'm pointing out! They're not >> orthogonal. >> > > Ok, not completely orthogonal, there is overlap. Having assertions on > postings does partly determine the order they must be applied. This depends > also on how order-independent transactions (and postings within > transactions) are. > > This gets a bit complicated. Eg, currently Ledger respects journal order > more, and transaction dates less, than hledger does when deciding the order > in which to to apply postings and assertions (I don't have an example to > hand). And on the other hand, hledger is more respectful of journal order > than Ledger is when processing postings and assertions within a single > transaction. Alright... so here's the punchline: I'm claiming that if Ledger or HLedger gave up on balance assertions attached to postings, if you separated them as I do, just that change, you would both very likely be able to guarantee order-independence w.r.t. your input files! Think about it. (If you don't think it would be enough, can you share why?) Personally, I think it would be well worth it, it's a really nice property to have. It would simplify the semantics of your systems, at relatively little cost. If you disagree, mighty fine - this is why we have diverse implementations after all - at least the example in this thread should serve as documentation for others who might come across this problem inadvertently. If I were you I'd add the example to your docs too in case someone has this problem. Cheers, -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
