Jens Owen wrote:
Jose,

I've been on the road for the last few days, so I haven't had a chance to express my concern for porting the DRI to C++. Please take these concerns with a grain of salt as I am definitely in the old fuddy duddy class (as Keith calls it) in that I'm not fluent in C++.

Concern #1: Acceptance into XFree86, etc. Creating dependencies on C++ compilers could be a big issue for some of the major projects that utilize our code.

This is probably the biggest issue. I think if we agree to use a reasonable subset of C++, we should have a good chance. This is probably something we should bring up on [EMAIL PROTECTED] sooner rather than later.


Concern #2: As a driver writer, I prefer looking at C and thinking in terms of the machine transactions that are likely to take place based on that code. C++ code tends to hide that level of detail for me and I don't feel like I've got a strong grip on the various machine transactions when using it.

The hidden detail tends to come from three things: function / operator overloading, inheritance, and templates. I don't think the first or third items will particularly come into play. We may use C++ templates, but not in the usual, generic programming sort of way. DRI already uses a lot of inheritance in the C code, so I don't think that's a problem.


Concern #3: Readability by the active contributors. I'm not the only old fuddy duddy in this group of developers. How much "readability" time do you figure the young C++ whipper snappers will save by investing in this transition to C++?

I don't think the issue is readability so much. I think the bigger issue is the ability to share code among the drivers. Looking at the code for the various CreateContext functions, the code is about 60% between mga, radeon, r200, and r128 drivers. I assume that the mach64 and savage drivers will likely be the same. I haven't looked at the i810 and i830 drivers, but they probably follow similar form. If we could share a bunch of that code among four or five drivers, it would save a LOT of duplicated code. Why cut-and-paste when you can just re-use the same code? :)




-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to