On 06/08/2012 06:42 AM, Igor Maravić wrote: > Sorry for the late reply... > > I'm really sure if it is going to compile on Fedora 8. What is the > earliest version of gcc that you wish to support? > > It has a lot of fancy new functionalities :) > The most noticeable are standardized threading support, variadic > templates (templates with variable number of arguments), lambda > expressions (small inline functions written directly in to the code), > move semantics (rvalue references), auto keyword, smart pointers... > > XorpCallback class could be written as variadic template - that would > reduced the code size drastically, and it would be more readable. > Move semantics have large impact on performances. > With lambda expressions and auto keyword code could be written to be > more readable. > etc...
Fedora 8 is using gcc 4.1.2. As clever as the new features might be, I think we should hold off for at least a few years. And, I still think that a well written object hierarchy is the way to go for XorpCallbacks instead of using templates. I don't ever want to add threads to Xorp...it is hard enough to debug a multi-process construct..adding threads on top of that would make it even more difficult. Smart pointers might be useful, but in my opinion, smart-pointers often just paper over design bugs where people never could figure out exactly how the life-time of objects should be managed. Truth is, I have more issues with memory leaks when writing java code than in c & c++ :P Thanks, Ben -- Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
