From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTvcC-000565-OS for qemu-devel@nongnu.org; Tue, 16 Sep 2014 12:28:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTvc6-0000C6-KH for qemu-devel@nongnu.org; Tue, 16 Sep 2014 12:28:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTvc6-0000B0-Co for qemu-devel@nongnu.org; Tue, 16 Sep 2014 12:28:22 -0400 Date: Tue, 16 Sep 2014 19:26:34 +0300 From: "Michael S. Tsirkin" Message-ID: <20140916162634.GA2195@redhat.com> References: <1410792279-2488-1-git-send-email-arei.gonglei@huawei.com> <54170C7F.8080409@redhat.com> <20140915174503.GB13548@redhat.com> <87wq94xc7v.fsf@blackfin.pond.sub.org> <5417F698.2060001@redhat.com> <87sijsq60x.fsf@blackfin.pond.sub.org> <5418040F.3020106@redhat.com> <20140916103709.GA17910@redhat.com> <541814D7.8040300@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <541814D7.8040300@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: weidong.huang@huawei.com, aliguori@amazon.com, qemu-devel@nongnu.org, agraf@suse.de, Markus Armbruster , arei.gonglei@huawei.com, stefanha@redhat.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com On Tue, Sep 16, 2014 at 12:45:43PM +0200, Paolo Bonzini wrote: > Il 16/09/2014 12:37, Michael S. Tsirkin ha scritto: > > str really should be for free-form strings. > > It makes as much sense to call it as string > > Yes, that's why I said drive->str is a degradation. The question is, > how important is that degradation? > > > as it is to call an integer a string because you type > > a string of characters to specify it. > > I disagree. This is true for the command line, and for historical > reasons it is also true for device-add, but the newer QOM commands are > type-safe. You cannot pass an integer as a JSON string '123' to qom-set > or object-add, for example. > > Paolo Right so types should be explicit. If an arbitrary string isn't allowed, this should be documented. It's not great as is: what's the format for macaddr? AA:BB:CC:DD:EE:FF? aa:bb:cc:dd:ee:ff? aabbccddeeff? 0xaabbccddeeff? But just saying "string" is going in the wrong direction imho. -- MST