gdbtypes.h #defined field accessors
Joel Brobecker
brobecker@adacore.com
Mon Jun 28 20:57:00 GMT 2010
> 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
More information about the Gdb
mailing list