Re: [AD] explicit prefixes on structure field names

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thursday 14 December 2006 4:40 pm, Peter Wang wrote:
> On 2006-12-14, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > On Fri, 2006-12-15 at 02:17 +1100, Peter Wang wrote:
> > > Attached is an example against Elias's xdummy branch.  For example, all
> > > AL_SYSTEM_INTERFACE fields might begin with "sysif_".  I think the
> > > benefit is quite clear, for example, in the line:
> > >
> > > -    active = driver->initialize(0);
> > > +    active = driver->sysif_initialize(0);
> >
> > Yes, the benefit is clear. But to me, also the disadvantage. What if we
> > end up with something like:
> >
> > active = sysinf->sysinf_initialize(0);
> >
> > It just looks more unreadable to me than needed.
>
> Alternatively, we can avoid ambiguous single word names for fields and
> variables. e.g.
>
> active = sysdrv->initialize_system(0);

As much as I dislike long names, descriptive == good.

> Peter
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/