3 ms·
YAML isn't a programming language. The fact that it's often abused to be one is not the fault of the syntax.
by geerlingguy 6y ago
YAML isn't a programming language. The fact that it's often abused to be one is not the fault of the syntax.
- agbell 6y agoIt is definitely not the fault of YAML. It has its own issues but that is another story. The problem is when you use YAML (or an ad hoc interpreter embedded in YAML, or a templating system built on top of YAML) for things that should really be a programming language. Things like imports and functions and composition are useful. Templating is a more ergonomic form of string concatenation.
- mumblemumble 6y agoUsually, when I have to deal with these crazy complicated YAML files at work, I'm not thinking, "I wish they had just turned all the configuration into a mess of shell scripts." I'm thinking, "We really need to clean this up. It's way more complicated than is necessary."
- agbell 6y agoYou have a point. A mess of shell scripts doesn't really sound like an improvement. If the config is too complex and the config consumer can be changed to simplify things then that should be the way to go. However, if the config is a travisCI YAML file that is really just a glorified list of commands I don't think bash or a makefile is a bad solution. Take as much as possible out of the CI config and use a neutral standard format like a makefile to encapsulate much of your logic. Then when TravisCI stops offering free usage for open source, its easy to move, because your format isn't specific to a vendor.
- SCLeo 6y agoI think the point of the this article is exactly what you said: YAML, when used as a programming language, is horrible.
- sofixa 6y agoYAML is horrible, regardless of how its used ( unless for a flat <10 line configuration): https://noyaml.com/ https://noyaml.com/
- swiley 6y agoYaml based programming languages are built by people who want to know what lisp is but don't.
- alephnan 6y agoI agree. The visionary executive team at a certain company I worked at felt otherwise and poured millions and thousands of eng hours into recreating HTML/JavaScript MVC components, but with YAML