[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: Is there something like libmonotone?

From: Peter Simons
Subject: [Monotone-devel] Re: Is there something like libmonotone?
Date: 29 Jan 2005 11:42:32 +0100

graydon hoare writes:

 > it seems to me that *invoking* monotone via system() or
 > execve() is just as easy as any sort of libmonotone would
 > be, and that the majority of the problem people are
 > perceiving is in parsing output.

Parsing the output is a problem, yes. Having a switch that
makes monotone output just the bare facts without any
annotation (so that this format is unlikely to change too)
would help matters greatly.

I don't think that invoking Monotone via system() is a good
solution for everybody, though. For one, that's bound to
have worse performance than a library that's linked into
your program will have. More performance is wasted on
parsing and handling the text output: a library could just
return the naked data structures.

Furthermore, it is a lot more effort for the program author
to define all the data structures (which he will ultimately
need) himself from the scratch, instead of just including a
"monotone.h" header which contains well-defined types

Then there is the general issue of code re-use: Monotone
probably contains lots of useful functions and classes that
someone writing a VC-related software would like to use
internally, too.

Last but not least, I think that a library API that mirrors
the command-line would not come with a higher risk of misuse
or data corruption than doing the same tasks by specifying
command line flags would.

In my personal opinion, having a separate library for the
core functionality would also constitute good software
design, and would most likely make life easier for the
Monotone authors as well -- even if the majority of
applications will be happy to use the monolithic binary.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]