From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SenyX-0001D6-JP for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SenyN-0007Hj-NS for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:51:09 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:34592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SenyN-0007Hc-Gi for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:50:59 -0400 Received: by dadn2 with SMTP id n2so3985dad.4 for ; Wed, 13 Jun 2012 06:50:57 -0700 (PDT) Message-ID: <4FD89ABD.4090201@codemonkey.ws> Date: Wed, 13 Jun 2012 08:50:53 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <76ad34dd30a83d96a97bc7443245ee9c165e053f.1339578989.git.peter.crosthwaite@petalogix.com> <4FD8658C.700@redhat.com> <4FD86B35.90000@suse.de> <4FD86EAA.1060005@redhat.com> <4FD88E95.8060806@suse.de> <4FD88F4B.20603@redhat.com> <4FD89604.7050606@codemonkey.ws> <4FD896C1.4030905@redhat.com> <4FD89753.2050904@codemonkey.ws> <4FD897EB.7040601@redhat.com> In-Reply-To: <4FD897EB.7040601@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v0 5/8] object: make interfaces concrete List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, "Peter A. G. Crosthwaite" , paul@codesourcery.com, edgar.iglesias@gmail.com, =?ISO-8859-15?Q?Andreas?= =?ISO-8859-15?Q?_F=E4rber?= , john.williams@petalogix.com, avi@redhat.com On 06/13/2012 08:38 AM, Paolo Bonzini wrote: > Il 13/06/2012 15:36, Anthony Liguori ha scritto: >>>> >>> >>> 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. > > Whose side effect is that interfaces need to be concrete. > >> 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. > > Yes, and that's why you needn't really care about what the user does. > Garbage in, garbage out... Quick chat on IRC and I think we both agree that we need to promote the notion of Interface to a first class concept in QOM. I'll send out a patch later today (that's actually tested..). Regards, Anthony Liguori > > Paolo >