tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: proplib and the jet age



On Sat, Jan 05, 2013 at 01:41:22PM +0000, Alexander Nasonov wrote:
 > > Obviously you do what you need to do (for whatever reasons)... but do
 > > keep in mind that in general, using Turing-complete languages for
 > > configuration is a bad thing.
 > 
 > Building a custom config language has it's drawbacks to. People do it
 > very differently (e.g. dhcpcd.conf vs dhcpd.conf) and it takes some
 > efforts to write a parser (and bugs may sneak into it too!).
 > 
 > As a result, it has a high learning curve for both users who have to
 > learn many different config languages and developers who have to learn
 > parsing tools.

Developers need to learn parsing tools anyway, but that's not much of
an argument since the only parsing tools you need for handling simple
config files are fgets(3), strchr(3), and strtok_r(3). In languages
like Perl and Python it's even easier.

If the syntax (as opposed to the semantic content) of your config file
requires more than a couple paragraphs in its man page to describe,
you're probably doing something wrong.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index