At what point does a config file become a programming language?

后端 未结 18 1806
清酒与你
清酒与你 2021-01-29 18:27

I have been mulling over config files and their relationship to code for a while now and depending on the day and direction of the wind my opinions seem to change. More and mor

18条回答
  •  后悔当初
    2021-01-29 18:30

    It depends on what you agree with other developers on the team. Are you using config files just as config files or you are creating a Model Driven application.

    Symptoms of config file becoming a programming language:

    • name=value pairs start to depend on each other
    • you feel a need to have flow control (ex. if (this) than that)
    • documentation for config file becomes essential in order to do further development (instead of just using the application)
    • before value from config is read it requires to have some context (i.e. values depend on something external to config file itself)

提交回复
热议问题