On Oct 13, 10:11 am, Luke Kanies <[EMAIL PROTECTED]> wrote:
> On Oct 8, 2008, at 1:56 PM, dd-b wrote:
>
> > On Oct 8, 3:31 am, Peter Meier <[EMAIL PROTECTED]> wrote:
> >> Hi
>
> >>> Foo::bar["default"] {
> >>> [...]
> >>> The only way I can get this syntax to work is to move the 'bar'
> >>> definition outside of the foo class and refer to it by a name
> >>> without
> >>> '::' in it in foo2. Is there a way to override a definition with
> >>> '::'
> >>> in its name?
>
> >> it's Foo::Bar["default"] {
>
> > Let me just mention that this use of capitalization is *so totally
> > bizarre*. And not really explained anywhere; what does it mean, why
> > is it there at all?
>
> Some parts of Puppet are designed, some are accreted, and some are
> somewhere in between, as with most software projects and languages.
>
> Puppet's capitalization is influenced by Ruby's, but not nearly so
> consistently as Ruby's is, unfortunately.
>
> The basic theories you're encountering are:
>
> - Instances use lower case, collections are capitalized.
> - Treating the '[]' syntax as operating on the Foo::Bar collection of
> instances. In other words, your retrieving an instance from a
> collection.
>
> One can certainly argue that these aren't *good* theories, or aren't
> realized perfectly, but that's what I was thinking when I wrote it.
Thanks. I need to understand it a lot more than I need to "approve"
of it; in fact I can't really have any strong opinion until after I
understand it.
I started in on Ruby a couple of years ago, but it only lasted a few
days for me (I didn't have a real need for a new language, and I'm
pretty comfortable using Perl inheritance and object structures), so
I'm not always picking up on features that were just inherited from
the underlying language.
> One of my goals for the coming year is to try to fix some of these
> niggling inconsistencies in the language, but we'll see.
Consistency is good, but of course there are always 10x hours of
things needing doing and 1x hours of time to do them in.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---