This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdbtypes.h #defined field accessors


> In new code I don't generally write accessors.

I don't know if this is relevant to this particular discussion, but
I tend to like opaque structures and accessors (setter/getter) functions,
and I try to use that when writing new code.  The idea is that it's just
very easy to figure out who's reading the data, and who's modifying it.
Sometimes, it's the only way to go, because the data structures are
complex enough that we shouldn't expose their contents, but even for
simple data structures, this can be handy.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]