Re: [PATCH] implemented strbuf_write_or_die()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 4, 2014, 18:45 UTC
- Message-ID
- <xmqq61ntls4l.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <53159A81.4050905@alum.mit.edu>
Michael Haggerty <mhagger@alum.mit.edu> writes:
Show 9 quoted lines
> On 03/03/2014 07:31 PM, Junio C Hamano wrote: >> That is a very good sign why this change is merely a code-churn and >> not an improvement, isn't it? We know (and any strbuf user should >> know) that ->buf and ->len are the ways to learn the pointer and the >> length the strbuf holds. > ... > ... Writing strbufs comes up frequently and will hopefully increase in > usage and I think it is a positive thing to encourage the use of strbufs > by making them increasingly first-class citizens.
Yeah, I understand that. I suspect that the conclusion would have been very different if we were a C++ project; most likely it would be an excellent idea to add an often-used write_or_die() method to the strbuf class. But we are writing C.
> Faiz, this is the way things go on the Git mailing list. It would be > boring if everybody agreed all the time :-)
Surely, and thanks ;-)