[Top][All Lists]

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

Re: New ideas for the API

From: Filip Van Raemdonck
Subject: Re: New ideas for the API
Date: Sat, 7 Feb 2004 16:42:09 +0100
User-agent: Mutt/1.3.28i

On Sat, Feb 07, 2004 at 04:00:54PM +0100, Sven Herzberg, GNOME Deutschland 
> Am Sa, den 31.01.2004 schrieb Gustavo Noronha Silva um 10:34:
> > The first one, http://bugs.debian.org/230315, seems to me like a
> > good idea and somewhat obvious functionality for those
> > functions in particular, then it's probably going to be done
> > in CVS as soon as I arrive in Belo Horizonte and turn on my
> > laptop (I'm leaving on this trip in 1 hour).
> I'd definitely vote against this as application developers can easily
> write.
> ---
> gchar* command;
> command = g_strdup_printf ("command %s %d", param1, param2);
> gksu_call_some_method (command);
> g_free (command);
> ---

Sure, if a developer can write the above, why would he want anything
overly simplified as:

gksu_call_method ("command %s %d", param1, param2);

He won't even know what's really going on anymore!

We can add this functionality nearly for free, and it saves the
application developer both on (command) string setup, and on memory
management. Given that these are the two things that cause most problems
in C application development, it's well worth taking this out of their
Aside from the fact that this makes application code more readable and
as a consequence easier to maintain...

> Introducing printf features in gksu looks to me like being either:
>  * code duplication (we have the code in glib), or

You do realize that "code duplication" and "code use" are different
phrases, and have different meanings?



"Microsoft is a cross between the Borg and the Ferengi.  Unfortunately,
 they use Borg to do their marketing and Ferengi to do their programming."
        -- Simon Slavin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]