[asterisk-dev] Reverse Inheritance
chris at tooley.com
Tue Nov 11 10:57:26 CST 2008
On Tue, Nov 11, 2008 at 4:28 AM, Michiel van Baak <michiel at vanbaak.info>wrote:
> On 21:07, Mon 10 Nov 08, Trevor Peirce wrote:
> > John Todd wrote:
> > > These symbols seem fine, but in the long view it is perhaps the case
> > > that the "_" character was incorrect as the leading indicator for
> > > forward inheritance. It seems, logically, that "+" and "++" should
> > > represent forward and infinite forward inheritance, and "-" and "--"
> > > should indicate reverse and infinite reverse inheritance. We may be
> > > too far out of the gate for this type of serious change (or shift) to
> > > be practical, and there may be other syntactical/parsing reasons why
> > > what I think is reasonable is not a practical nomenclature.
> > >
> > 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.
> > Forward inheritance: _variable or __variable
> > Reverse inheritance: variable_ or variable__
> > A memory technique that can be associated with this is if the variable
> > name is after the _ mark, it will go to channels created after. If the
> > variable name is before the _ mark, it will go to the channels created
> > before.
> Good one. I really like this over the +
> As many people use the syntax of foo_bar_baz to name variables this could
lead to some serious unintended consequences. There's been many a time that
I've seen an unintended _ at the end of a variable name (much more
frequently than at the beginning, but that still suffers the same issue.)
Just a thought, not really a vote either way.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-dev