From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: make thread_list static
Date: Wed, 28 Nov 2012 14:35:00 -0000 [thread overview]
Message-ID: <877gp5bxtk.fsf@fleche.redhat.com> (raw)
In-Reply-To: <50B5D8EF.1020400@redhat.com> (Pedro Alves's message of "Wed, 28 Nov 2012 09:27:11 +0000")
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> This was after getting sick of writing callback-style iterators
Pedro> in the itsets run-control work, and introducing the macro there
Pedro> first. This isn't different from ALL_OBJFILES and several other
Pedro> similar macros in the tree (which I realize from this that you'd
Pedro> rather remove). We could switch to callback-style before pushing
Pedro> those patches in, but, IMO, the convenience and readability of
Pedro> the resulting code trumps the implementation detail exposure
Pedro> detail.
Ok. I won't put it in.
FWIW -- I am not really a fan of the callback style. It is too verbose,
usually requiring a new struct and marshalling and unmarshalling, which
means more places to forget something.
But, I'm also not a fan of the ALL_* macro approach. I think it
obscures the code.
On the whole I'd prefer iterator objects along the lines of
dictionary.h. These are a mild pain since in C the iterator object has
to be fully visible, but some discipline and/or field-uglification
approaches can deal with that adequately.
Tom
prev parent reply other threads:[~2012-11-28 14:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 18:30 Tom Tromey
2012-11-28 7:27 ` Joel Brobecker
2012-11-28 8:41 ` Yao Qi
2012-11-28 9:27 ` Pedro Alves
2012-11-28 14:35 ` Tom Tromey [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=877gp5bxtk.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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