Re: [AD] explicit prefixes on structure field names |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] explicit prefixes on structure field names
- From: Elias Pschernig <elias@xxxxxxxxxx>
- Date: Thu, 14 Dec 2006 16:59:52 +0100
On Fri, 2006-12-15 at 02:17 +1100, Peter Wang wrote:
> Hi,
>
> In another project I work with there are prefixes on structure field
> names, which are different for each structure type. I find this greatly
> helps when reading code because you instantly know which structure the
> field is part of. It also helps with ctags and grep. Would we be
> willing to adopt this convention for 4.3 code?
I vote weakly no.
> 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.
--
Elias Pschernig