On 20-10-2019 03:19, Justus Pendleton wrote:
> On Monday, April 11, 2016 at 6:13:46 AM UTC+7, Martin Blais wrote:
> 
>     
> https://bitbucket.org/blais/beancount/issues/118/create-a-balance_end-directive
>     
> <https://bitbucket.org/blais/beancount/issues/118/create-a-balance_end-directive>
> 
> 
> To get my feet wet with parser changes, I took a stab at implementing
> this in
> https://bitbucket.org/blais/beancount/pull-requests/137/implement-balance_end-directive-for-issue
> 
> Like everyone else, I'm not thrilled with the 'balance_end' name, so if
> anyone has any better idea now's the time to share it :)

Hello Justus,

I don't understand what issue this patch is solving. I have read the
mailing list thread, but I am still confused.

As implemented, the `balance_end` directive cannot be generated by the
import framework (as it does not have a python representation) nor it
can be manipulated with any of the beancount tools (as it is translated
to a plain `balance` directive).

It is thus only syntactic sugar that allows to write, for example,

2019-10-28 balance Assets:Foo  0.00 USD

as

2019-10-27 balance_end Assets:Foo  0.00 USD

which I find not that useful, once you know that `balance` applies at
the beginning of the day. I don't think that the advantages are worth
the increased cognitive burden in learning and interpreting the syntax.

If this is seen as something useful, I would advocate for adding an
extra argument to the `balance` directive, with a syntax like:

2019-10-27 balance ending Assets:Foo  0.00 USD
2019-10-28 balance beginning Assets:Foo  0.00 USD

or using `end` and `begin` instead, I don't know which one looks better
in this case (as a non-native English speaker I'm always confused).
Keeping `ending` to be the default, the current compact syntax would
still work. I thing the changes to the parser to support this syntax
would also be minimal.

Cheers,
Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/a2ef1f17-3dc5-0112-9dec-87992693cc97%40grinta.net.

Reply via email to