News for hackers. Stuff that matters.
Re:YAML: probably not so great after all (2017) by krapp on Wednesday June 20, 2018 @06:13PM (#17360306)
>I don't understand why the popular dynamic script-y languages don't more commonly use the natively-expressable associative/list data structures that they're famous for making convenient.

You picked the wrong language... PHP comes with its own JSON parser. And INI and XML and even CSV.

But, the reason is that, generally, you want config files to describe data or state only. Yes, you could just make your config native code, but then the temptation to add functions and methods and logic to that becomes irresistible and soon your config is an application that needs its own config.

Config formats need to be simple, and preferably not Turing complete.

Re:YAML: probably not so great after all (2017) by user5994461 on Wednesday June 20, 2018 @07:25PM (#17360811)
Any configuration will eventually become a programming language.

See The Configuration Complexity Clock. https://mikehadlow.blogspot.com/2012/05/configuration-comple...

Re:YAML: probably not so great after all (2017) by krapp on Wednesday June 20, 2018 @10:09PM (#17361521)
Just because it's common doesn't mean it should be encouraged by writing your config in native code to begin with.

INI is still simple, and JSON doesn't support logic, so the madness can be held at bay at least for a time.

XML and s-expressions are lost causes, though.