On Friday, July 4, 2014 9:42:00 AM UTC-5, henrik lindberg wrote:
>
> Next up in the quest to understand and specify how defaults work / 
> should work is the support to set class parameters via the resource 
> default expression. 
>
> You can do this, to set defaults on classes 
>
>       class a ($x) { 
>        notice "The x is $x" 
>       } 
>       Class { x => 'the default' } 
>       include a 
>
> The output is "The x is the default" 
>
> This is a very blunt instrument as it is not possible to define the 
> defaults for a particular class. And (drumroll), it is almost useless as 
> the parameters specified must be parameters that exist in *all classes*. 
>
> The only possible meaningful use of this is to set meta parameters such 
> as `audit`, or `loglevel` on every class. 
>
> Can we remove this support? 
>
>

Dressing classes in resource clothing doesn't make them resources.  
Neither, really, does using some of the same abstractions to represent the 
two, except in a rather technical sense.  At the DSL level, Puppet classes 
have always had substantially different semantics from bona fide resources, 
and that this question even arises springs from a steadfast and 
well-intentioned, but less-well conceived, attempt to ignore that.  This is 
not at all the only area where ignoring the distinction causes trouble.  
Resource-like class declaration syntax should never have been 
introduced.<descend from='soapbox'/>

TL/DR: tear it out -- we never should have had it anyway!


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/b2ab233f-2f55-4e6b-b414-309a8b2aecc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to