Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: NEWSTRUCT: type names



Johannes Stezenbach wrote:
> 
> On Mon, Oct 07, 2002 at 01:17:32PM +0200, Klaus Schmidinger wrote:
> > Holger Waechtler wrote:
> > > Klaus Schmidinger wrote:
> > > > Wouldn't it be better to use some naming convention for typedefs/enums
> > > > in the driver? Something like
> > > >
> > > >   typedef enum {
> > > >         HIERARCHY_NONE,
> > > >         HIERARCHY_1,
> > > >         HIERARCHY_2,
> > > >         HIERARCHY_4,
> > > >         HIERARCHY_AUTO
> > > >   } eHierarchy;
> > >
> > > no, I don't like the hungarian notation and it's not usual in kernel
> > > definitions. Modern coding style books even discourage from using this
> > > notation because of it's useless redundancy. The compiler can check
> > > correct type usage.
> >
> > I don't like the HN either, but with enums I've come to find it useful
> > to be able to simply come up with a name by just preceeding whatever this
> > is about with 'e'. Note that HN usually is about marking *variables* with the
> > type - that's not what I'm suggesting. I was talking about a *type* name.
> 
> IMHO using generic names like "Hierarchy" for type names in API
> header files is evil. It just provokes conflicts.
> 
> I suggest something equivalent to "dmxPesType_t" in dmx.h for
> the frontend type definitions. "FeHierarchy" may look ugly,
> but it's unlikely to cause conflicts...

I guess using the xyz_t nomenclature would probably be the best idea.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index