I think the argument about "." being dual-purposed as a scoping operator as well as a boolean operator is valid. I don't think anybody is arguing (at least strongly) that "." is an invalid operator for "and", but rather that when reading through the policy, seeing "." makes many programmers think "scoping operator" rather than "and".
For those of us (like me) who have been using Cf2 for nearly a decade and have never had the luxury of having (useful) scopes in policy, this hasn't ever been a problem. But I could definitely see how peppering Cf3 policy with scoped variables that use "." could reduce readability and understandability when class definitions appear nearby also using "." notation. In Cf3, is "&" still a valid "and" operator for class logic? If so, then I suggest just enforcing coding standards at your organization to avoid using "." as "and"...a simple shell script with grep could find these cases and (for example) prevent code from being checked into your version control system. Paul Krizak 7171 Southwest Pkwy MS B200.3A MTS Systems Engineer Austin, TX 78735 Advanced Micro Devices Desk: (512) 602-8775 Linux/Unix Systems Engineering Cell: (512) 791-0686 Global IT Infrastructure Fax: (512) 602-0468 On 12/20/2011 02:18 PM, Mark Burgess wrote: > On 12/20/2011 06:28 PM, no-re...@cfengine.com wrote: >> Forum: CFEngine Help >> Subject: Re: CFEngine Help: Re: CFEngine Help: Thoughts about some cfengine >> design decisions? >> Author: sauer >> Link to topic: https://cfengine.com/forum/read.php?3,24311,24379#msg-24379 >> >> Ted Zlatanov Wrote: >>> I think local classes should remain as they are, but the user should >>> have an option to push them to the global scope. Otherwise cfengine has >>> to change the class selector syntax to denote scope; obviously >>> "bundle.classname" won't work because "." is AND >>> already, so the syntax will get nasty. >> I never use the . as an "and" operator, because it's the one thing in >> CFEngine which isn't consistent; sometimes it's used to specify scope, and >> other times it's used as a boolean. I'd personally *really* like to see the >> ability to turn on a compatability option in the agent control body which >> switches the period in class names from a boolean operator over to a scope >> specifier. >> > > If you think in set logic, these are equivalent, so I don't really > perceive a problem here as you do. > The "." means subset, which is an AND. > _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine