On Nov 4, 2008, at 10:24 PM, Florian Grandel wrote:

>
> Hi Luke,
>
>> What I'm saying is that I'd like to once again hide the latter set of
>> attributes, if we get a different set of public attributes.
>>
>> This way the developer has some control over whether every little
>> variable in a class is exposed.
>>
>> Either that, or add a keyword that specifies that a given variable is
>> exposed publicly.
>
> I get your point now. Intuitively I prefer the second variant (a
> keyword) as it's more flexible and closer to what other languages  
> offer.
>  And I somehow like the possibility to define public constants over
> hard-coding numbers or whatever into parameters.
>
> I think that only constants may be public. Writeable variables'  
> state is
> undefined where there is no such thing as a clear temporal execution
> order. How do you solve this now? (I am not using writeable public
> variables so no experience about that.)

You can't write to variables from outside of a class, and you can't  
use a class's variables until the class has been evaluated, so all  
exposed variables are effectively constants once they're set.

-- 
When a man tells you that he got rich through hard work, ask
him: 'Whose?' --Don Marquis
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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