KConfigIniBackend::stringToPrintable optimization patch

Ingo Klöcker kloecker at kde.org
Sun May 31 13:51:40 BST 2009


On Friday 29 May 2009, Oswald Buddenhagen wrote:
> On Fri, May 29, 2009 at 10:41:38AM +0200, Mirko Boehm wrote:
> > I feel like starting a flame war :-)
>
> ha!
>
> > On May 28, 2009, at 13:02 , Oswald Buddenhagen wrote:
> >> On Thu, May 28, 2009 at 09:50:57AM +0700, Vyacheslav Tokarev wrote:
> >>> +    char* data = result.data();
> >>
> >> please use
> >>   char *variable = ...
> >
> > It is a character pointer, that is the type of the variable. It is
> > not a character that happens to be pointing to something. So it
> > should be char* var, not char *var. The latter structure requires
> > you to read the whole statement, only to figure out that the first
> > thing you understood (char) was wrong.
> >
> > I have no interest in the discussion, but I wanted to point out
> > that the preference to type *var; is completely incomprehensible to
> > me. Imagine there would be more stars. Uuuh.
>
> well, some people just have understanding that hard-wired. :)
>
> anyway, that whole argumentation makes no sense unless you completely
> forbid char *foo, bar, **baz;
> style declarations. while i agree that using this c[++] feature is
> not so nice in declarations of class members and global objects (both
> of which should have expressive names), i'll readily laugh in the
> face of anyone who tells me not to use "char c, *cp;" or the like in
> a function with 10 lines.

As Lubos hinted on in his reply, the Kdelibs Coding Style tells you not 
to use "char c, *cp;" or the like in a function with 10 lines in 
kdelibs. [1]


Regards,
Ingo

[1] 
http://techbase.kde.org/Policies/Kdelibs_Coding_Style#Variable_declaration
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090531/3cb96adc/attachment.sig>


More information about the kde-core-devel mailing list