[asterisk-dev] Reverse Inheritance

Atis Lezdins atis at iq-labs.net
Tue Nov 11 11:38:09 CST 2008


On Tue, Nov 11, 2008 at 7:26 PM, Trevor Peirce <tpeirce at digitalcon.ca> wrote:
> Tilghman Lesher wrote:
>> On Monday 10 November 2008 23:07:19 Trevor Peirce wrote:
>>
>>> I would strongly advise against this as it starts to resemble math too
>>> much and could misleading. As an alternative I suggest appending _ to
>>> the variable name in contrast to prepending.
>>>
>> If the plus sign sounds too much like math, which is an objection I can
>> understand, how about using the caret sign ('^'), which is another character
>> that Jared Smith suggested in our discussion
>
> The caret did occur to me as a possible solution as well, but it is
> already used to pass multiple values to some Dial options such as
> G(context^exten^pri) and M(x[^arg]). Again, it would be confusing to
> have multiple uses of the same character.
>
> As I am not a C programmer the coding inconvenience wasn't apparent to
> me. Perhaps another potential idea would be to add an option to the
> existing naming scheme?
>
> Forward inherit: _blah or __blah
> Reverse inherit: _+blah or __+blah
>
> I think this sufficiently resolves the confusion that it could be a math
> operator as the inheritance operator is still there.
>

Perhaps it's better to use functions as there are already GLOBAL(var)
and SHARED(var). One way would be to have it set by PARENT(var) and
read by SHARED(var), but some other namespace (and function name)
could be used too.

Regards,
Atis


-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-dev mailing list