tech-userlevel archive

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

Re: proplib and the jet age



David Holland 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.

It's not suprising that many prefer shell as a config language. I don't
know if POSIX shell is Turing-complete but bash is, according to
wikipedia. Bummer.

I can draw some loose analogies between shell and Lua:

Shell                  Lua
source /path/to/file   loadfile('/path/to/file')
sh /path/to/file       dofile('/path/to/file')
chroot                 setfenv

I've never seen any shell config using chroot but setfenv is definitely
used by many.

Alex


Home | Main Index | Thread Index | Old Index