On 19/07/2016 13:59, Eduardo Habkost wrote: >>> > > If it's internal, do we have any reason to register a (writeable) >>> > > property in the first place? Why not use a plain old >>> > > "obj->field = value" C statement? Or, if a simple assignment >>> > > isn't enough, why not a simple obj_set_field(value) C function? >> > So that arch neutral code won't have to pull obj type definition > > I don't get it. If arch neutral code uses it, it should be > available in an arch-neutral header.
I agree. If arch-neutral code uses it, the method should be in CPUClass. Paolo >> > and we would be able to reuse all machinery that uses properties >> > instead of inventing yet another API or ad-hoc function calls. > Why is adding a new C function or setting a struct field worse > than adding a new property name? I actually prefer the former, > because it makes code review easier and allows the compiler to > detect more mistakes.