On 06/13/2012 08:33 AM, Paolo Bonzini wrote:
Il 13/06/2012 15:30, Anthony Liguori ha scritto:
Anyway, I don't like the idea of making interfaces concrete. That means
that a user could directly instantiate an interface which doesn't make a
lot of sense.
Concrete doesn't mean "instantiatable by the user". It means
"instantiatable period".
Interfaces are not supposed to be instantiatable by anyone. The fact that
object_new() is used to create the interface is an internal implementation detail.
Interfaces are stateless and by definition, never have an implementation on
their own. So object_new() of an interface type directly results in a useless
object.
Regards,
Anthony Liguori
Paolo