make pkg_install suite reusable, please
rwatson at FreeBSD.org
Sun Apr 11 11:41:27 UTC 2010
On Fri, 9 Apr 2010, Charlie Kester wrote:
> It was a watershed moment in my programming career when I realized that the
> bubbles on those DFD charts we used to use for structured design could be
> whole processes and not just functions in a single, monolithic program.
> Suddenly everything the structured design folks were saying about re-use,
> encapsulation, loose coupling, module cohesion, etc. made a lot more sense
> when viewed from the perspective of simple Unix utilities communicating with
> plain text via pipes. We should encourage that approach as a default, and
> only put things into binary libraries when forced to by performance
Per my e-mail, I'm not sure I entirely agree with this view, although for
certain types of scripting and programming it makes a lot of sense. What was
always missing from this model is a structured way to pass complex data
between components: streams of one-line ASCII strings work fine, but when you
want to pass data structures, you end up replicating code to generate and
parse data between components. Maybe XML is an answer to this, but more
likely it's not :-).
There's also the issue of plugging and types: if you support complex types,
why not have type checking on the plugs? For example, "gzcat | tar -xf -"
only for certain file types: wouldn't it be nice if type information, as well
as byte streams, were passed around and you could do static checking, or even
negotiation. But it would be nice to get a clear typing error instead of
This is, BTW, what windowing systems do for copy-and-paste: when you copy from
one program and paste to another, the two programmes negotiate an appropriate
intermediate format: if the target doesn't support rich text, then it needs to
be generated as plain text by the source, etc.
More information about the freebsd-hackers