Because it is a declarative promise language - which is somewhat different
than the usual imperative programming language model.  A fine point, but
different nontheless.  Declarative languages are hard to get your head around
if you think in purely imperative terms.  Once you "let go" and allow
yourself to change your mindset, it gets easier :-)

The promise
        files:
            "/etc/passwd"
                perms => mode("644");

does not imperatively say "change the mode to 644".  It declaratively
promises that "the mode will be 644" (which implies that it will be changed
if it is out-of-spec, but also implies that nothing ill be done if it is
already as you say it shall be).  This is a simple example - it gets more
complicated, obviously, when dealing with edit_line promises, or process
promises, etc, but in all cases, you are declaring "what must be" - and not
always "how to do it".

Honestly, I'm not being nit-picky.  Imperative/declarative is a real difference.

-Dan

> On 3/2/2010 11:28 AM, Daniel V Klein wrote:
> >
> > Cfengine is not a programming language - it may have some language-like
> > features, but it is not a programming language.
> 
> How can something that controls what a program does not best be 
> understood as a programming language?
> 
> -- 
>    Les Mikesell
>     lesmikes...@gmail.com
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to