git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/6] Introduce sorted-array binary-search function.

From
YDYann Dirson <ydirson@free.fr>
Date
Dec 30, 2010, 10:49 UTC
Message-ID
<20101230104908.GB3296@home.lan>
In-Reply-To
<AANLkTimkemRW1H7XvwbECWUHHWVpGnvKukn06DiQO9Ce@mail.gmail.com>
On Thu, Dec 30, 2010 at 02:06:28AM +0100, Erik Faye-Lund wrote:
Show 11 quoted lines
> On Thu, Dec 30, 2010 at 1:40 AM, Yann Dirson <ydirson@free.fr> wrote:
> > On Fri, Dec 10, 2010 at 02:29:09PM -0800, Junio C Hamano wrote:
> >> In addition, these macros in this patch are almost unreadable, but that
> >> probably is mostly a fault of C's macro, not yours.
> >
> > Yes.  When writing those I sorely missed the readability of C++
> > templates - yuck :)
> 
> Unfortunately, it's something that ends up subtracting from the value
> of the change; a couple of duplicate functions is often easier to
> maintain than nasty macros.
Well, I don't find this one much less readable than, say, vcs-svn/trp.h

At least the declare_gen_* ones are quite readable. Maybe making the macro names shorter would help clarify the convenience wrappers ?

Previous: Erik Faye-LundNext: Yann Dirson
Message 6 of 15 in “generalizing sorted-array handling”
  1. generalizing sorted-array handlingYann Dirson, Dec 8, 2010
  2. 1/6 Introduce sorted-array binary-search function.Yann Dirson, Dec 8, 2010
  3. Junio C HamanoDec 10, 2010
  4. Yann DirsonDec 30, 2010
  5. Erik Faye-LundDec 30, 2010
  6. Yann DirsonDec 30, 2010
  7. 2/6 Convert diffcore-rename's rename_dst to the new sorted-array API.Yann Dirson, Dec 8, 2010
  8. Junio C HamanoDec 10, 2010
  9. 3/6 Convert diffcore-rename's rename_src to the new sorted-array API.Yann Dirson, Dec 8, 2010
  10. 4/6 Convert pack-objects.c to the new sorted-array API.Yann Dirson, Dec 8, 2010
  11. 5/6 Use sorted-array API for commit.c's commit_graft.Yann Dirson, Dec 8, 2010
  12. 6/6 [RFC] subvert sorted-array to replace binary-search in unpack-objects.Yann Dirson, Dec 8, 2010
  13. Junio C HamanoDec 10, 2010
  14. Junio C HamanoDec 10, 2010
  15. Yann DirsonDec 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.