Forum: CFEngine Help
Subject: Re: CFEngine Help: Re: Namespace change
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,27302,27384#msg-27384

Diego Zamboni Wrote:
-------------------------------------------------------
> > So, when can I expect the "other" scope selector to also support being
> > a colon, removing the confusion that I regularly see between using period
> > for two different things? ;)
> 
> Actually that change happened already, I just realized the documentation
> has not been updated. The namespace separator is now a colon, in the
> most recent checkout from github.

I was referring to the bundle->variable separator being changed to support 
bundle:variable.  The namespace declaration essentially defines a hierarchy 
which the bundle scoping is already a part of.  I'd expect that the namespace 
parameter could theoretically be extended to include multiple colon-delimited 
sections, allowing an organization somewhat like CPAN uses (though hopefully a 
tad less "organic" - maybe more like Java), along the same lines.  The parser 
would still only have to split into a maximum of three pieces using the last 
two colons, but essentially allowing a colon to be part of the namespace name 
itself would allow a heirarchy with arbitrary depth.  So, at that point, it 
makes sense to also allow separating the variable from the bundle with a colon 
(and presumably keeping the period as an option for backward compatibility).

I'd personally really like to make my codebase use all ampersands and colons, 
and never use another period-which-means-different-things-in-different-contexts 
again. :) It's really the only thing in the language whose behavior is 
contextually dependent, and this seems like a good opportunity to provide an 
optional resolution to that inconsistency.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to