3 ms·
One strategy that I've used before is to write every program as a library, then put a very thin command-line program in front of it. All new functionality goes
by btilly 16y ago
One strategy that I've used before is to write every program as a library, then put a very thin command-line program in front of it. All new functionality goes into the library, then gets exposed.
That gives the best of both worlds. I have my usable program. And later I can easily integrate it into any other library that can benefit.
- jacquesm 16y agoThat's a really good approach. One particular area where the external program bit is annoying is when you're querying or setting system/package parameters or defaults on a unix machine, there must be 100 incompatible ways of doing that. Usually the only way to get the job done is to escape to a shell, which really feels kludgy.