[PATCH] KUser and new class KGroup

Ingo Klöcker kloecker at kde.org
Sat Jun 5 10:47:41 BST 2004


On Saturday 05 June 2004 11:07, Alexander Neundorf wrote:
> Well, I don't want to sound negative, but which advantage would the
> KGroup class offer over
> struct group gr=getgrname(name)/getgrid(gid); ?
> This seems to be basically the two calls which are used in these
> places, not hard to understand, easy to use, well known UNIX API.
> Wrapping a class around it adds another layer, which means overhead
> (not much), another layer which can have bugs and another new API to
> learn.

It's more convenient for (new) KDE hackers. They don't have to search 
the UNIX API for an appropriate function (on my system there are no man 
pages for getgrname/getgrid) because they find an appropriate class in 
the KDE API. They can use C++. The additional overhead is neglible. 
Bugs in the layer only have to fixed once. Bugs in the usage of the 
low-level UNIX functions have to be fixed in all spots. Only you have 
to learn a new API because you already know the low-level UNIX API. New 
KDE hackers don't have to learn the low-level UNIX API.

Since we already have a KUser class a corresponding K[User]Group class 
is the obvious thing any new KDE hacker would look for.

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040605/33c3c495/attachment.sig>


More information about the kde-core-devel mailing list