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

List:       kmail-devel
Subject:    Re: Serial number-related trouble, again
From:       Don Sanders <sanders () kde ! org>
Date:       2005-06-10 4:50:22
Message-ID: 200506101450.23008.sanders () kde ! org
[Download RAW message or body]

On Thursday 09 June 2005 23:35, David Faure wrote:
> On Thursday 09 June 2005 07:49, Don Sanders wrote:
> > I didn't want to bloat KMMsgBase with
> > extra member variables, so the solution I found was to use
> > KMMsgBase objects.
>
> This still makes no sense to me. You can use bitfields to add more
> bools to KMMsgBase without any trouble.

The advantage is that not even a bitfield is required. I only have to 
pay to store the information if it's required. A bit like the design 
philosophy of C++ (you only pay for what you use). 

Perhaps IIRC it's also an example of the flyweight design pattern. 

Basically we want to keep the KMMsgBase objects as small as possible 
as there's lots of them. (Ideally it would be best eliminate 
KMMsgBase entirely and just lazy look in the index and folder files 
but this wasn't easily doable in Qt3 and earlier, due to the design 
of the view classes like QListView. Maybe it can be done with Qt4)

> IMHO using serial numbers (which means refcounting them, to use
> them properly) is just adding complexity over complexity and making
> everything more fragile.

Yes valid criticism. But it would satisfy the requirement. I mean, I'm 
stating the obvious, but generally satisfying requirements means 
writing software which means more complexity which means more 
fragility.

But if you can find a way to solve the problem and make the code 
simpler, terrific, bravo.

Don Sanders.
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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