On Sun, Aug 9, 2020 at 1:19 AM Martin Blais <bl...@furius.ca> wrote:

> On Thu, Aug 6, 2020 at 4:24 PM Chary Chary <chary...@gmail.com> wrote:
>
>> Are you also planning to define beancount "API" more clearly and safely?
>
>
> Roughly speaking the same data model and similar access to data
> structures, special containers, and functions, via Python.
>
> We touched upon the subject in this discussion:
>> https://groups.google.com/g/beancount/c/UatQey1X0OY/m/0FGCrY5fAwAJ
>>
>> Would it not be logical, that by using defined API (I think you called it
>> "a contract") user is not able to "break" something, the API would simply
>> not allow this to happen?
>>
>
> This is a new major revision, I do want the freedom to evolve things and
> make them better, at least a bit.
> It won't be perfectly the same as before, but it'll be very close, at
> least conceptually.
>
>
> I know this may be a naive question (as I am not professional), but why
>> doesn't beancount use object-oriented approach?  So you have an object,
>> representing all transactions, and user can manipulate them (add / delete)
>> through methods, but implementation of the class does not allow unsafe
>> changes / operations?
>>
>
> That's a much longer discussion to have an out of scope for this forum,
>
[...]

Actually, never mind this long-winded answer. The short answer is that the
"API" is mostly just the data Beancount produces + a few simple library
functions and a container object (the Inventory). There's no point in
hiding the full set of directives behind an API, it would be like
replicating all the data model.

-- 
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 beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhONrMpSW%2Bb%2BfLJH0fRE6ZvC1JDApbL4zJaD2Eevn4Erjg%40mail.gmail.com.

Reply via email to