[PATCH 2/3] c/r: Add CR_COPY() macro (v3)

Dave Hansen dave at linux.vnet.ibm.com
Wed Mar 4 12:18:02 PST 2009

On Wed, 2009-03-04 at 13:53 -0600, Nathan Lynch wrote:
> On Tue, 03 Mar 2009 17:00:37 -0800
> Dave Hansen <dave at linux.vnet.ibm.com> wrote:
> > On Tue, 2009-03-03 at 16:57 -0800, Dan Smith wrote:
> > > DH> Did you convince Nathan that this ends up being a good idea?
> > > 
> > > Technically he hasn't seen this version, but my hopes are not high
> > > that he will change his mind.  If the feedback is that they're not
> > > liked, I'll happily remove them.
> > 
> > I just figure if Nathan feels that strongly that we'll encounter more
> > people who feel even more so.  So, I was curious if he changed his mind
> > somehow.
> No, not really, sorry.
> I understand why it's nice for the developer to have this sort of
> helper, but I don't think it's nice for someone trying to review or
> debug the code.

That's funny.  I've only reviewed and debugged these things, but I don't
think I've actually written any code that would have used these macros!
As someone trying to debug and review, I love how this looks.

It gets the point across much more clearly about what is going on to me
as a reviewer and I appreciate that.  memcpy()s contain a lot of gunk
that my brain can't parse easily, but this is rather clean, and it
*HALVES* the number of lines of code I have to look at.  

> Surely discussing these macros has already consumed more developer time
> than they would ever save?  :)

That's exactly my point.  We're not trying to save development time here
at all.  My argument is that this reduces the maintenance and review

-- Dave

More information about the Containers mailing list