git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karsten Blees <karsten.blees@gmail.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: [PATCH v2] hashmap API: introduce for_each_hashmap_entry() helper macro
Date: Thu, 17 Mar 2016 23:39:19 +0100	[thread overview]
Message-ID: <56EB3217.7090907@gmail.com> (raw)
In-Reply-To: <1458211127-26963-1-git-send-email-kuleshovmail@gmail.com>

Am 17.03.2016 um 11:38 schrieb Alexander Kuleshov:

> This patch introduces the for_each_hashmap_entry() macro for more

I'd rather call it 'hashmap_for_each', following the pattern
'operandtype_operation' used throughout git. E.g. we already have
'hashmap_get', not 'get_hashmap_entry'.

I realize that existing *for_each* implementations in the git code
base are a bit of a mess (except 'sha1_array_for_each_unique'). E.g.
there is 'for_each_string_list' and 'for_each_string_list_item'. Both
loop over the string_list_items of a string_list, but one is named
after the collection type, the other after the item type...IMO this
shouldn't set an example for future code.

The rest of the patch looks good to me.

      reply	other threads:[~2016-03-17 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 10:38 [PATCH v2] hashmap API: introduce for_each_hashmap_entry() helper macro Alexander Kuleshov
2016-03-17 22:39 ` Karsten Blees [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56EB3217.7090907@gmail.com \
    --to=karsten.blees@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kuleshovmail@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).