From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDMiB-0003y7-Lz for qemu-devel@nongnu.org; Tue, 23 May 2017 23:11:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDMi8-0005r2-Gc for qemu-devel@nongnu.org; Tue, 23 May 2017 23:11:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54562) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDMi8-0005qs-AA for qemu-devel@nongnu.org; Tue, 23 May 2017 23:11:44 -0400 Date: Wed, 24 May 2017 11:11:41 +0800 From: Fam Zheng Message-ID: <20170524031141.GI12279@lemon.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] new to qemu with a simple question List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wang Dong Cc: qemu-devel@nongnu.org On Wed, 05/24 10:56, Wang Dong wrote: > Some C source code is generate from json file. > > I wonder why this? What is the benefits of this? This allows you to concentrate on the high level semantics of the QMP API, without worrying about C syntax and structural code here and there. In one word, more conciseness and little code duplication. If done in C, it would be much more lines of code and hardly readable. Fam