Re: append value to variable slist

2010-06-06 Thread Nicolas Charles
Moreover, if you use the same list in the LHS and RHS, you might have surprise in the outcome given the classes For instance vars: any:: "list" slist => {"0"}; Class1:: "list" slist => {"1", "2"}; Class2:: "list" slist => {"3", "4"}; classes: Class1 exp

Re: append value to variable slist

2010-06-05 Thread Daniel V Klein
I hear that you would prefer to write it one way, but sorry, you can't. Well, you sort of can, you need to look at "policy => free" or the synonym for this which is "policy => overridable", but we think you'd be wrong. Let me give you a counterexample. I program in C, and there really have been

Re: append value to variable slist

2010-06-05 Thread Daniel Dehennin
Mark Burgess writes: > I think Daniel makes a good case, although Seva is right that defining a new > variable is > less ambiguous, as you would probably not want to rely on the actual contents > of a > variable that is changing dynamically in a complex environment. The first use case I see is

Re: append value to variable slist

2010-06-05 Thread Mark Burgess
I think Daniel makes a good case, although Seva is right that defining a new variable is less ambiguous, as you would probably not want to rely on the actual contents of a variable that is changing dynamically in a complex environment. I firmly believe that the biggest mistake people make in co

Re: append value to variable slist

2010-06-04 Thread daniel . klein
I agree with Seva, and also point out that by trying a list append, you are still thinking procedurally and not declaratively... Procedural programming (and thinking) says "do X, then Y, then Z" Declarative programming (which is what Cfengine is) says "make sure that X, Y and Z are all satisfied"

Re: append value to variable slist

2010-06-04 Thread Seva Gluschenko
Still get no clue why aren't you gentlemen satisfied with "bar" slist => { @(foo), "xyz" }; inclusion. 2010/6/4 Daniel Dehennin : > Vasiliy G Tolstov writes: > >> is there are any plans to add support to append value to slist ? >> >> For example: >> >> "a" slist => { "1", "2" }; >> "a" slist

Re: append value to variable slist

2010-06-04 Thread Daniel Dehennin
Vasiliy G Tolstov writes: > is there are any plans to add support to append value to slist ? > > For example: > > "a" slist => { "1", "2" }; > "a" slist => { "$(a)", "3" }; +1 I think the '"name" *list => {}' construct could be seen as: promise to have elements listed in '{}' in the list named

Re: append value to variable slist

2010-06-04 Thread Vasiliy G Tolstov
В Птн, 04/06/2010 в 13:24 +0200, Nakarin Phooripoom пишет: > In which situation would you like to do something like you mentioned? Could > you describe more for the scenario? There might be another way to get to the > same goal. > I want to dinamic crete slist of packages needed to install in s

Re: append value to variable slist

2010-06-04 Thread Nakarin Phooripoom
In which situation would you like to do something like you mentioned? Could you describe more for the scenario? There might be another way to get to the same goal. Cheers, --Nakarin On Jun 4, 2010, at 1:06 PM, Vasiliy G Tolstov wrote: > is there are any plans to add support to append value to

append value to variable slist

2010-06-04 Thread Vasiliy G Tolstov
is there are any plans to add support to append value to slist ? For example: "a" slist => { "1", "2" }; "a" slist => { "$(a)", "3" }; -- Vasiliy G Tolstov Selfip.Ru ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/ma