lkml.org 
[lkml]   [2015]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] list: introduce list_is_first()
From
Date
On 12/10/2015 07:17 AM, Geliang Tang wrote:
> We already have list_is_last(), it makes sense to also add
> list_is_first() for consistency. This list utility function
> to check for first element in a list.

Honestly, I think we already have way too many of these kind of helpers.
IMHO they don't really help, they hurt readability. You should know how
the list works anyway, and if you do, then it's a no-brainer what's
first and last. If you don't, then you are bound to screw up in other ways.

Just my 2 cents.

--
Jens Axboe



\
 
 \ /
  Last update: 2015-12-10 17:01    [W:0.081 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site