Re: [AD] explicit prefixes on structure field names |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
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);
Peter