Skip to content

Comment on Why GNU grep is Fastparent

Comments

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.

That'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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.