[darcs-devel] API

David Roundy droundy at darcs.net
Tue Mar 18 18:48:44 UTC 2008


On Tue, Mar 18, 2008 at 03:01:32PM +0000, Eric Kow wrote:
> > This has often been proposed, but I don't have time to write a darcs
> >  API---although the time I've spent refactoring darcs might help---and so
> >  far noone else has shown any interest in designing such an API, although
> >  numerous folks have wished it existed...
> 
> >From the just-be-stupid school of thought:
> 
> Rather than designing a proper darcs API, I was wondering if we could
> maybe just expose all of Darcs.Command.Foo in a way that would be
> almost equivalent to running darcs from the command line (except that
> you pass in arguments by building [DarcsFlag]).  Oh yeah, and maybe a
> single runCommand function from Darcs.Command itself.
> 
> Something quick, dirty and high-level.  It wouldn't give you any sort
> of interactivity, but it may be marginally nicer than calling darcs as
> a program.  Plus it'd be a foot in the library door.

We could certainly do this, but it seems to me like it's marginally less
nice than calling darcs as a program.  All you gain is that you don't rely
on darcs command-line flags not changing? Or rather, I suppose you gain the
fact that darcs doesn't need to be installed to use your program.  But at
the same time, you lose in that users now have to recompile your program if
they want to benefit from bugs that are fixed in a newer release of darcs.
-- 
David Roundy
Department of Physics
Oregon State University


More information about the darcs-devel mailing list