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

List:       kopete-devel
Subject:    Re: [Kopete-devel] Status update
From:       Martijn Klingens <klingens () kde ! org>
Date:       2004-01-24 18:12:28
Message-ID: 200401241912.28109.klingens () kde ! org
[Download RAW message or body]

On Saturday 01 January 2000 22:55, Jason Keirstead wrote:
> The problem with an APl like this ( yes it was considered, I know the
> registerCommand is incredibly long ),
> is it will make things INCREDIBLY terse in the objects adding commands.
>
> Consider, that the irc protocol adds almost 20 commands already, with
> probably at least 15 more by next release.  Separating the API like
> this  would increase the LOC count by at least five-fold in this area.

Hmm, chicken and egg :)

Generally reducing code size reduces clutter and results in more readable 
code.

In this code however the more verbose version might actually be less cluttered 
and more readable instead.

What might be an alternative approach is to let the register{Command,Alias} 
methods take the most basic parameters, instantiate a KopeteCommand object 
and RETURN a pointer to it.

That way you can set additional properties after the register() call.

I bet there are even more solutions to this (IMO too) long argument list.

But like I said, don't let this stop you from committing, this (possible) 
refactoring is independent.

-- 
Martijn
_______________________________________________
Kopete-devel mailing list
Kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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