> Well, inheriting doesn't work with parameterized classes at all right now,
> because of bug 4534 :)
>
>

After #4534, I believe we'll be in the state that you'll be able to do this:

class parametrized($param) inherits nonparametrized {
}

but the reverse is still not well defined:

class nonparametrized inherits parametrized {
}


of the top of my head, I can think of two different semantics that I'd be
happy with:

Either, as RI suggested, the parameters just get aggregated

class A($one) {}
class B($two) inherits A {}
class { B : one => 1, two => 2 }

or, there's a style I learned from Scala (but it probably has origins in
other languages) that might be more powerful:

class A($alpha, $beta) {}
class B($one, $two) inherits A(alpha => $one, beta => "B") { }

such that subclasses have a totally distinct parameter signature from their
superclasses, and you explicitly declare what parameters the superclasses
get

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