From 5c6b7ed38be3426039ed087aa7134ee392ee29dd Mon Sep 17 00:00:00 2001 From: metst13@1d16544ec52801db7efb2895d3dc7a4458b8eb45 Date: Fri, 6 Jul 2018 09:10:18 +0000 Subject: --- doc/forum/Separation_of_data_and_code.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/forum/Separation_of_data_and_code.mdwn (limited to 'doc/forum/Separation_of_data_and_code.mdwn') diff --git a/doc/forum/Separation_of_data_and_code.mdwn b/doc/forum/Separation_of_data_and_code.mdwn new file mode 100644 index 00000000..3a09a237 --- /dev/null +++ b/doc/forum/Separation_of_data_and_code.mdwn @@ -0,0 +1,11 @@ +I'm using Fedora for the desktop and CentOS on my server. I have many software packages to install. I store them in shell scripts, with lines like this: + + yum -y install vim-common vim-enhanced gvim vim-X11 # the latter for clipboard support + +I'm thinking about some more elaborate way to do that (to put some packages to specific hosts and groups). Propellor seems an interesting tool for that, but when I see an [example configuration file](https://git.joeyh.name/index.cgi/propellor.git/tree/joeyconfig.hs), it looks like this is a mixture of data and logic, which is considered [not a very good practice](https://softwareengineering.stackexchange.com/questions/229479/how-did-separation-of-code-and-data-become-a-practice). + +I know that Haskell itself is a very declarative language (in the sense it's not imperative), but still I have this feeling of a mixture of code with constants. What do you think of that? + +Is there a way to cleanly store names of packages (with comments and some configuration options (e.g. on what hosts they should be used)) in one place and use propellor's logic to install them in another place? + +I understand that the power of propellor is to `do` things apart of just enumerating them, but I think that this separation could be useful. -- cgit v1.2.3