This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [patch] Lno branch merge -- scalar evolutions analyzer


On Jul  6, 2004, Zack Weinberg <zack@codesourcery.com> wrote:

> Sebastian Pop <sebastian.pop@cri.ensmp.fr> writes:
>> On Mon, Jul 05, 2004 at 08:12:07PM -0700, Mark Mitchell wrote:

>>> Do you think that these accessor functions are worth it?  It seems like 
>>> we already have a ton of code that just does "e->src", etc.  It seems to 
>>> me like we should just use the "->" form, unless we want to go through 
>>> and change all the existing code.  I don't think this is a big deal one 
>>> way or the other, though.

>> IMO it is a better practice to access the fields of a struct via
>> functions or macros.

> I disagree vehemently.  When the function or macro does nothing other
> than the pointer dereference, it is obfuscation.

Err, no, it's called abstraction.  It enables you to change the
internal data structure without having to go through all users of the
data structure and change them as well.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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