Re: libceph API

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

 



On Thu, Apr 28, 2011 at 11:27 AM, Yehuda Sadeh Weinraub
<yehudasa@xxxxxxxxx> wrote:
> On Thu, Apr 28, 2011 at 11:24 AM, Yehuda Sadeh Weinraub
> <yehudasa@xxxxxxxxx> wrote:
>>>
>>> What do you guys think of changing struct ceph_mount_t to struct
>>> ceph_mount_info_t?
>>>
>> I personally don't like sticking a _t prefix to a struct. It's either
>> a typedef or a struct.
>>
> Ahrm.. *postfix*
>

I'm ok with removing the _t stuff from our library APIs. But it we'd
have to bump up the revision numbers on everything :P

I'm just going to leave this here:

http://ceph.newdream.net/git/?p=ceph-client.git;a=blob;f=Documentation/CodingStyle;h=8bb37237ebd25b19759cc47874c63155406ea28f;hb=HEAD

> 		Chapter 5: Typedefs
>
> Please don't use things like "vps_t".
>
> It's a _mistake_ to use typedef for structures and pointers. When you see a
>
> 	vps_t a;
>
> in the source, what does it mean?
>
> In contrast, if it says
>
> 	struct virtual_container *a;
>
> you can actually tell what "a" is.
>
> Lots of people think that typedefs "help readability". Not so. They are
> useful only for:
> [...]
>

I'll come back once the flamewar has settled down :)

Colin
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux