qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer t


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types
Date: Mon, 08 Aug 2011 08:17:03 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]