|
|
|
|
|
by dozzie
3387 days ago
|
|
No, please don't. Configuration file should be declarative and passive. You
should be able to generate and load such file from any other language
(for reporting, for detecting what things are configured, stuff like that).
Programming language embedded in a configuration file makes the config
unreadable. |
|
It is very convenient - and sometimes absolutely necessary - to allow people to put their logic into configuration. Things like if dev_env: debug = true else debug = false. Or whatever else they might need there. Without that, you are forcing users to use something outside of your config files to generate that logic. The best approach depends on usecase.