BIND 10 #461: Empty node processing in MemoryZone Easy Part
BIND 10 Development
do-not-reply at isc.org
Thu Jan 20 01:19:46 UTC 2011
#461: Empty node processing in MemoryZone Easy Part
-------------------------------------+-------------------------------------
Reporter: hanfeng | Owner: vorner
Type: | Status: reviewing
enhancement | Milestone: A-Team-
Priority: | Sprint-20110126
critical | Resolution:
Component: data | Sensitive: 0
source | Add Hours to Ticket: 0
Keywords: | Total Hours: 0
Estimated Number of Hours: 0.0 |
Billable?: 1 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:8 hanfeng]:
> > What's wrong with bool template parameter? It is completely valid, and
is closer to what you actually pass inside. I know your way is more
extensible, but do we expect we will need the extensibility? There are
some 3 layers of hiding that the parameter is actually a boolean, which
makes the code harder to read.
>
> For template syntax, we can pass integer as template parameter, but it's
not usual way.
> For each feature, we can do quick hack, but if later, we need add more
policy into the rbtree, all the place using rbtree has to change, but use
template class, the modification is less. And the function name is clearly
specify the purpose which I don't think decrease the readability.
FWIW, I think I agree with Michal. I don't think we need (this type of)
extendability in rbtree; BIND 9 has proven that in its 10 year
history. (Besides, the use of rbtree may be our short term solution
and we'll probably revisit the data structure fundamentally.) Also,
while it's true the use of primitive type values as a tempate
parameter is less common, it's also a quite widely deployed technique
(we use it in some of our own BIND 10 code, too). Whether specific code
is readable or not is often a matter of opinion, so I'd leave this point
to you two, but if the use of boolean template parameter helps code
simpler
and at least relatively more readable, I'd support the idea of using it.
--
Ticket URL: <http://bind10.isc.org/ticket/461#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list