Personally, Ive tended to keep the C++ code in the objects to a minimum, I keep the 'real code' in the C files, the new 'modules' will mean this is better managed, allow code reuse etc, and they are compilable units. so I dont really see a problem in having a bit of interfacing code in XML.
on the other hand, I also think annotating C++ code with comments (as its been done for years by IDEs and things like JUCE) is straightforward, you don't really need to use anything particularly complex, you just make it clear to programmers what is generated code vs user code. (and most programmers are familiar with this concept since its so common)
Id also highlight, like in C++/Java, its likely your going to want to use an IDE (aka object editor) in the future, because we will need to add things like 'UI layout' for objects, and this is tedious to do in 'text', which is why IDEs follow the generated code/comment approach.
as always theres countless options out there, they all have advantages/disadvantages, so we have to be clear what precisely we are trying to improve....
@toneburst, we are hoping/planning to introduce a package concept, this is a level higher than objects, which is probably more suitable for licenses/cat photos etc
EDIT:
p.s I dont actually have any issues editing the C code in the XML, the only thing I dont like, is that it could be format better
e.g.
it does stuff like (and tends to do the same to my code )
<code.krate><![CDATA[ switch(inlet_s>0?inlet_s:0){
case 0: outlet_o= inlet_i0;break;
case 1: outlet_o= inlet_i1;break;
case 2: outlet_o= inlet_i2;break;
case 3: outlet_o= inlet_i3;break;
case 4: outlet_o= inlet_i4;break;
case 5: outlet_o= inlet_i5;break;
case 6: outlet_o= inlet_i6;break;
case 7: outlet_o= inlet_i7;break;
default: outlet_o= inlet_i7;break;
}
]]></code.krate>
if it just added a new line it would be easier to read, and make no difference to the compiler
<code.krate><![CDATA[
switch(inlet_s>0?inlet_s:0){
case 0: outlet_o= inlet_i0;break;
case 1: outlet_o= inlet_i1;break;
case 2: outlet_o= inlet_i2;break;
case 3: outlet_o= inlet_i3;break;
case 4: outlet_o= inlet_i4;break;
case 5: outlet_o= inlet_i5;break;
case 6: outlet_o= inlet_i6;break;
case 7: outlet_o= inlet_i7;break;
default: outlet_o= inlet_i7;break;
}
]]></code.krate>
so just force a new line, so that the C code, was separate from the XML tags