[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: enum's & KConfigBase
From:       André_Wöbbeking <Woebbeking () onlinehome ! de>
Date:       2006-01-17 21:40:11
Message-ID: 200601172240.12369.Woebbeking () onlinehome ! de
[Download RAW message or body]

On Tuesday 17 January 2006 00:40, Stefan Teleman wrote:
> On Monday 16 January 2006 17:41, Dirk Mueller wrote:
> > I'm not so sure if its a good idea to convert enums to integers and
> > back. enum's tend to be reordered within applications, which break
> > binary compatibility (not a problem usually for inner-apps usage)
> > but then also breaks configuration reading. This is a major
> > problem. KDE applications break already way too often their own
> > configuration (I cannot remember how often already I had to redo
> > the very same settings in e.g. konversation because the way the
> > configuration key was stored was changed *yet another* time). We
> > shouldn't make it too easy to keep that nasty habit.
>
> Not to mention the fact that in C++ the sign-ness and the underlying
> type used to represent an enum type are implementation-defined,
> therefore the conversion to a signed integer creates a big
> portability problem right from the start. It is common to have enums
> implemented as bitfields.

FYI, at least with VC 6 enums are signed, i.e. for the enum values 0, 1 
you need 2 bits.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic