lkml.org 
[lkml]   [2008]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -mm 1/5] list.h: add list_singleton
From
Date
On Mon, 2008-03-17 at 11:04 -0400, Masami Hiramatsu wrote:
> Hi Peter,
>
> Peter Zijlstra wrote:
> >>> So I guess we can proceed with your list_singleton(), but I'd just like to
> >>> flag this possible confusion, see what people think..
> >
> > May I kindly ask to please not use the singleton name like this. It does
> > not implement the singleton pattern and will be a great confusion for
> > everybody who expects it to.
>
> Indeed.
>
> I have some other candidates.
> - list_single
> - list_has_one
> - list_one
>
> Could you tell me which or some other name you recommend?

I think list_has_one() or list_is_singular() are good names, they convey
they are a test for a condition by using a form of be.



\
 
 \ /
  Last update: 2008-03-17 16:15    [W:0.253 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site