From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SenkO-0002xw-Ej for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SenkH-0002AY-Qc for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:36:32 -0400 Received: from mail-pz0-f47.google.com ([209.85.210.47]:39007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SenkH-0002AB-KC for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:36:25 -0400 Received: by dalh21 with SMTP id h21so1175073dal.34 for ; Wed, 13 Jun 2012 06:36:23 -0700 (PDT) Message-ID: <4FD89753.2050904@codemonkey.ws> Date: Wed, 13 Jun 2012 08:36:19 -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> In-Reply-To: <4FD896C1.4030905@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: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 >