On 01/25/2012 02:33 AM, Andreas Färber wrote:
Am 25.01.2012 00:03, schrieb Anthony Liguori:
On 01/24/2012 04:06 PM, Jan Kiszka wrote:
On 2012-01-24 22:53, Anthony Liguori wrote:
But I don't like this.  The problem is that the declarative syntax we
have doesn't distinguish between "not-specified" and
"zero-initialized".

That's surely solvable.

Please try :-)

I've spent a good chunk of time mulling this over and could not find an
acceptable solution.  I think the same is true for the GObject folks.

There is a declarative solution for this that I know of, a C++ class
definition ;-)

So what's the reason not to go with one of the object-oriented,
C-compatible languages GCC supports, like C++ or Objective-C/C++?
(Objective-C has native reflection capabilities fwiw.)

I actually prefer C++ but much in the same fashion that I prefer 8-space 
indenting.

I think it's objectively better, but not significantly better enough to warrant the disruption of introducing it.

C++ makes polymorphism easier and declaring classes a little nicer, but it doesn't help significantly with factories, properties, or introspection.

Polymorphism in C is mostly a one-time cost so once you have the infrastructure (object.c), it's not really that bad.

Regards,

Anthony Liguori


Personally I disliked those trivial mini init functions in the initial
2/4 series, too, but I don't really mind an imperative approach either.

Andreas


Reply via email to