4 ms·
Spot on. I'm constantly amazed at how many projects use _serialization formats_ as a "programming language". LiquiBase, NAnt, MSBuild, Ansible.
by anton_gogolev 11y ago
Spot on. I'm constantly amazed at how many projects use _serialization formats_ as a "programming language". LiquiBase, NAnt, MSBuild, Ansible.
- raverbashing 11y agoMaven or pretty much anything XML based
- reitanqild 11y agoIn defense of maven it does provide neither branching nor looping statements so refering to it as a "programming language" is hard to justify.
- collyw 11y agoNeither does HTML and the L stands for language.
- detaro 11y ago"language" != "programming language"
- executesorder66 11y agoNotice how the M stands for "Markup" and not "Programming"
- roma1n 11y agoI haven't seen conditionals or loops widely used within Maven's XML.
- crdoconnor 11y agoIt can work but it works best when the language is kept dumb. A dumb declarative language is easier to understand and easier to maintain. It can be used to help maintain a strict separation of concerns. The smarter you try to make the language, the worse it becomes. Ant & MSBuild AFAIK are basically full programming languages in their own right so there was really no point to them actually being their own language.
- TeMPOraL 11y agoThat's people constantly reinventing Lisp, refusing to use the right tool for the job. Greenspun's Tenth Rule also comes to mind.
- Jweb_Guru 11y agoLisp is not and has never been the right tool for configuration management.
- zeveb 11y ago> Lisp is not and has never been the right tool for configuration management. Why not? Configurations are collections of items, and among the things Lisp excels at is…lists of atoms. Take a look at https://github.com/ansible/ansible-examples/tree/master/lamp_simple https://github.com/ansible/ansible-examples/tree/master/lamp... (a simple LAMP stack implemented in Ansible). It uses a .ini-style file to manage lists of hosts, e.g.: [webservers] localhost [dbservers] bensible sensible Why not put that in a list? (hosts (webservers localhost) (dbservers bensible sensible)) The Ansible playbooks are YAML lists. There's no particular reason that: --- # This playbook deploys the whole application stack in this site - name: apply common configuration to all nodes hosts: all remote_user: root roles: - common … is more readable than: (playbook "This playbook deploys the whole application stack in this site" (play "apply common configuration to all nodes" (hosts all) (remote-user root) (roles common) …) or: (playbook '((all '(common) :user root :comment "apply common configuration to all nodes") …) :comment "This playbook deploys the whole application stack in this site") In fact, I'd argue that both Lispy representations are much more readable.
- Jweb_Guru 11y agoOh, I didn't mean to say that S-expressions can't be used for configuration. It's that in general you don't want a Turing-complete language to do configuration management, because you want to be able to reason about things like rollbacks, dependencies and diffs.
- gerbilly 11y agoIt seems like parsing is becoming a lost art. Maybe because it can't be easily approached by the iterative development style that is in fashion these days.
- ufo 11y agoThe real lost art here is scripting languages. Even if you parse things yourself, configuration files still have a natural tendency to evolve into a crappy programming language over time. So instead of writing your own config file format you should just make a couple a quick bindings for a scripting language like Lua, Python or Ruby.