Hi Luke,

> In other words, I think the low-cost approach (fixing current stuff)  
> is not the right idea here, and a higher-cost approach (where cost is  
> mostly design) is the right solution.

That's ok for me.

> This would obviously be straightforward, at this point, in that one  
> could just use the existing definition syntax for adding parameters,  
> although it would further confuse the distinction between them.

That's not a problem for me as I don't see a profound difference anyway. ;-)

> I'm amenable to this change as a short-term mechanism for adding  
> attributes to classes, but I would tend to require a change with it:   
> The '$class::attribute' syntax would only be able to see the  
> attributes mentioned in the prototype, rather than any internal  
> variables.

What do you mean by prototype? The class definition? (As opposed to a 
class instance?) I am used to the distinction "prototype vs. singleton", 
that's why I might be confused by your use of the term "prototype" here.

If you mean the class definition by "prototype" then I didn't get your 
point. I still see various possibilities to maintain other attributes 
than those passed into a class as "parameters":
- You can use "$class::attribute" with constant values, even derived or 
somehow calculated values are ok as long as they are constant at 
runtime. This means the value can be declared in the class definition 
and is otherwise read-only. (My preferred solution)
- You can set the value of "$class::attribute" from "outside". I don't 
know what this could be good for because I didn't have a use-case for 
this yet. (So to keep it simple and clear I wouldn't do that...)

In both cases you could maintain "independant" class attributes.

>> If public class/definition attributes were missing, however, I
>> could well do without them.
> 
> You'd retain all of this; you just wouldn't have it to *all*  
> variables, just those that are mentioned in the prototype.

I think we have a misunderstanding here. I didn't mean that public class 
attributes need to be taken away. I just wanted to say that if you 
didn't introduce public attributes into /definitions/ then I wouldn't mind.

Florian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to