On Jan 7, 2012, at 12:17 PM, Susan Spencer wrote:
As a non-OOP programmer I have to walk inkscape's code to understand it. When the code behavior is unexpected given the assumed data type , it can be confusing. Pointers are no problem until parameters are passed. A few calls later if an incorrect assumption was made about the data type then the code can appear to be inscrutable. The 0 values indicate a data type that don't match up with code behavior.
I realize that Inkscape is an incredible programming achievement. But this bit of info is very helpful to people like me.
I think between you and Johan we have a good point to explore.
There are some things about C++ (and OOP in general) that differ from C. Some are stylistic, but then others get to be more functional.
We want to get our code quite clear and easy to work with. We of course also want to get the program powerful, and the code efficient.
I have the feeling that certain underlying principals here overlap with some things I'd been going over recently with people at work. We had been discussing a few things about Microsoft "hungarian" notation, and why it is bad. Part of what we hit upon involved how it interferes with C++ and the OOP approach (where one treats all types as the same, and not different from each other). This aspect becomes quite evident if one considers C++ templates and code that applies to pointers, integers, complex classes, etc. all with no changes.
It probably is a very good idea to capture some of this. At the very least we should get any question a person new to our codebase might ask identified and recorded so we can consider things. In general we get a choice of either changing how some approach to code is used, or changing what people know about our code. Capturing as much as we can in the wiki and making sure it's easy to see and use is probably a very good thing.