On Mon, 13 Jan 2014 19:27:36 +0100 Tom Wijsman <tom...@gentoo.org> wrote: > > Not an API. APIs are bad. What we should have is a good set of > > lightweight Unix-friendly command line tools. See, for example, the > > "Scripting Commands" section of "man cave". > > It still is an API that way, just expressed differently
The term "API" seems to mean "library or communication interface" these days (see "Git API" and the like). So for clarity, it's probably better to make the distinction. > if you would only do this you're introducing forks where you might > not need them. Providing shell commands is one possible binding to > the API... Forks are far less of a big deal than trying to share a process between programming languages. This is a *huge* deal when trying to integrate modern C++ with languages with primitive thread-hostile runtimes like Python and Ruby. Unless you're doing a heavy GUI (in which case portability probably isn't going to cut it anyway, without a far larger API than it's worth providing), most of the cost for most of the use cases for this is in the PM reading in configs and the like. The way around that is to allow communication via pipes, still in a Unix-friendly manner. This can be implemented nearly transparently. -- Ciaran McCreesh
signature.asc
Description: PGP signature