For the reasons you mention (mainly the first one), it can sometimes be useful to use a separate programming language with functions that are used to create the required format, without needing the configuration format itself to do these things.
If not, you can use this language safely inside the config.
If yes, you could as well use the main language of your application, and not introduce an extra dependency.
There is, of course, always a temptation to take awk, or PowerShell, or Ruby, "because it's already installed on the system", which may not be the case on all platforms.