Re: Private data members

Daniel Jacobowitz
2009-07-29T13:39:01Z

On Wed, Jul 29, 2009 at 12:45:32PM +0400, Vladimir Prus wrote:
> At the moment, there are at least 3 places that directly assign
> a value to that field, and while I can convert them easily, nothing
> will prevent a direct assignment to appear in future. In C++,
> one would use 'private' visibility for that member, but it's not
> available in C. So, how about introducing a small convention --
> that members with names ending in '_' are 'private' and should
> never be accessed by outside code. Another alternative is to
> modify the comment on ignore_count, but that is much more likely
> to be ignored.

How about struct { int ignore_count; } private; ? I don't think
ignore_count_ is clear.

--
Daniel Jacobowitz
CodeSourcery