From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Senmt-0003r1-Ne for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:39:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Senmq-0002wx-KH for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:39:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Senmq-0002wS-Bu for qemu-devel@nongnu.org; Wed, 13 Jun 2012 09:39:04 -0400 Message-ID: <4FD897EB.7040601@redhat.com> Date: Wed, 13 Jun 2012 15:38:51 +0200 From: Paolo Bonzini 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> In-Reply-To: <4FD89753.2050904@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-15 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: Anthony Liguori 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 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... Paolo