[asterisk-dev] Reverse Inheritance

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Nov 10 18:11:27 CST 2008


During a review of one of the bugs on the bugtracker (13140), I found that
somebody had implemented what is essentially a reverse-inheritance on a
variable.  What occurs to me is that if one person wants it, perhaps it would
be wise to implement it in a general way, so that others may also benefit from
that behavior.

This brings up two questions in my mind.  First, what are the safeguards that
we must abide by to ensure that nothing unsafe happens?  For one thing, I
think it would be sensible to ensure that variables can only be set, not
overwritten with this method.  Can anybody think of other possible problems
with implementing reverse inheritance?

Second, how should variables be denoted?  I have discussed this with Jared
Smith, and we both agreed that using '+' in place of '_', where '_' means
forward inheritance and '+' means reverse inheritance would be appropriate.
Doubling either symbol would denote infinite inheritance in that particular
direction.  Is there any further discussion of this use, or is the usage
of '+' an acceptable symbol?

-- 
Tilghman



More information about the asterisk-dev mailing list