Forum: CFEngine Help Subject: Re: CFEngine Help: Thoughts about some cfengine design decisions? Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,24294,24341#msg-24341
Greetings, This is an excellent discussion. I'd like to bring up a few rebuttals and points of my own. Class scope should be clear and defined. I don't like the idea of loosening this. It reminds me of the looseness of PHP and the breaches it caused. Don't go for the quick and easy fix. With regards to anonymous subroutines, or inline body parts if you prefer. Both sides have a point but, I agree with Mark. The suggested changes look nice from a programmer's point of view. However, I don't like treating Cfengine syntax as a programming language. I see many examples of that and the results are mostly unreadable. Add in line body parts and we'll be back to the very long promises we hand in Cfengine 2. When we first start we usually view the body parts with apathy. They seem tedious and unnecessary. However, once we have a good library of body parts under our belt we usually forget about them. In exchange promises are short and easy to read. "Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. " -- Knuth. Which brings me to data structures. I agree that the current batch leaves a bit to be desired. I avoid using more than a list because I find them so difficult to follow. I'm all for improving them for better function and readability. In template file promises I would like to see lists other data structures work with them. I do not agree that the required two promises is too much to bear. Yes, you have to cache the template file. I suggest caching all files anyway in order to survive communication loss with the policy host. The alternative is a files promise for every iteration of the promiser file. At that price the current template file method is a good bargain! I think that allowing variables in classes would be clearer than the ifvarclass statement. The latter seems and ugly add on to me. Obviously the parser will have to canonify it automatically for us. Which brings me to efficiency. When you start to work with very large policies Cfengine 3 does noticeably slow down. The slow down is not a show stopper but, for a C program we know this should not happen. I'd like to see a major effort on the part of Cfengine developers towards large scale performance tests to fix these issues. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine