From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqPhd-000224-HS for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:17:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqPhb-0003aT-6w for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:17:09 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:64133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqPha-0003aN-VR for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:17:07 -0400 Received: by pzk37 with SMTP id 37so2976983pzk.29 for ; Mon, 08 Aug 2011 06:17:06 -0700 (PDT) Message-ID: <4E3FE1CF.2010203@codemonkey.ws> Date: Mon, 08 Aug 2011 08:17:03 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1312808190-31074-1-git-send-email-avi@redhat.com> <4E3FDDD6.9070501@codemonkey.ws> <4E3FE0B7.3090805@redhat.com> In-Reply-To: <4E3FE0B7.3090805@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 08/08/2011 08:12 AM, Avi Kivity wrote: > On 08/08/2011 04:00 PM, Anthony Liguori wrote: >> On 08/08/2011 07:56 AM, Avi Kivity wrote: >>> QEMU deals with a lot of fixed width integer types; their names >>> (uint64_t etc) are clumsy to use and take up a lot of space. >>> >>> Following Linux, introduce shorter names, for example U64 for >>> uint64_t. >> >> Except Linux uses lower case letters. >> >> I personally think Linux style is wrong here. The int8_t types are >> standard types. >> >> Besides, we save lots of characters by using 4-space tabs instead of >> 8-space tabs. We can afford to spend some of those saved characters on >> using proper type names :-) >> > > It's not about saving space, it's about improving readability. We have > about 21k uses of these types, they deserve short names. This is one of the few areas that we're actually consistent with today. Introducing a new set of types will just create inconsistency. Most importantly, these are standard types. Every modern library and C program should be using them. TBH, having short names is just a bad case of NIH. Regards, Anthony Liguori