4 ms·
I like having a config file like: host thatmachine.example.org port 9991 dbhost server.example.org ... which I can definitely parse myself. But it
by zvr 3y ago
I like having a config file like:
host thatmachine.example.org
port 9991
dbhost server.example.org
... which I can definitely parse myself. But it's also valid Tcl, if host/port/dbhost are defined proc's!
So this allows people to be able to create config files like:
set mydomain example.org
host thatmachine.$mydomain
dbhost server.$mydomain
if {$mydomain == example.org} {
port 12345
} else {
port 9991
}
I don't expect people to create huge programs in their config files, but being able to give them a "full-blown programming language" for free is sometimes desirable.