Philippe BERNERY wrote:

Le 23 avr. 07 à 16:48, Vadim Lebedev a écrit :

Hello,


I suppose that the silence on this subject should be interpreted as lack of objections....

So i'm going to commit it tomorrow


Vadim,

I have some comments on your code:
- You wrote a tolowercase method, which exists in the String class of owutil. You should use this method instead of using yours

You're right,
meanwhile i've spent week-end browsing through boost docs, and i've found
in <strings/algorithm.hpp> with wonderful collection of string related functions. for example there is a to_lower function which perfomance-wise is much better than
String::tolowercase. I suppose you're will not object if i'll use it.
or un-cased find function which is better proposition than double call to tolowercase and search

- There is a struct definition/declaration in sendSmsMessage method. To keep WengoPhone coding standards, you should declare/define it outside the method (you can keep it in the .cpp file), and declare it as a "class" with public methods.

I disagree here. I believe it is a mistake to have ALL of classes to be in global namespace it simply
augments chances of name conflict.
In this specific case the 'struct builder' is a functional object which is not intended to be used anywhere else but only inside sendSmsMessage function. There is no reason whatsoever to put it into global name space. As to usage of 'struct' instead of 'class' it is simple issue of NOISE/SIGNAL ratio. If i wrote 'class' i'll have to add 'public:' in the class body. Which would confer no additional information nor functionality. As I told before the 'struct builder' is for local consumption only, so if we can achieve the same result with
less text it  is better.

Of course one can object that typing the above email is much more expensive then to type 'public' :)
I simply try to share my  20  years of C++ coding experience.

Btw i'm in process to rewriting the patch to put my knewly accuired boost knowledge to some creative use,
so i'm going repost it shortly



Vadim

Regards

--
Philippe BERNERY <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
http://dev.openwengo.org


_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to