Hi Olaf This is an old discussion I just happened to remember now. I hadn't touched Drizzle code when Olaf wrote this, I have now. Also it's the first time in a long time I wrote C++, so...
I'm not supporting change in coding standards, otoh I wanted to point out that I do support Olaf in spirit: On Sat, Jul 2, 2011 at 8:36 PM, Olaf van der Spek <[email protected]> wrote: > Hi, > > I think some parts need updating. > > http://wiki.drizzle.org/Coding_Standards#Pointer_and_Reference_Expressions >> string &foo; > > IMO it should be string&. The & is part of the type, not part of the name. (My comment: Same is true for char* a vs char *a.) Yes! This is one of the silliest conventions in C/C++ programming. It's one of the only things I didn't immediately understand well in my first year of programming C, and this convention is the reason: It is damn confusing for beginners. And now that I've had a long break since the last time I did any C or C++, it is damn annoying. People say perl is messy and PHP and JavaScript are not real programming languages, but this is one of the most misleading coding conventions of all languages! Unfortunately however, this is how most C/C++ people write their code. Perhaps teachers in universities are better now than in the 90's, but a majority of the C++ coders out there will think this is the way to write & and *. I would support a change in the coding standards if 1. someone produces a big patch that changes all drizzle code to the new way in one go. (Ie I absolutely don't support a situation where coding standards say that new code should be written in one way, but all the old code is actually written in another way.) 2. A number of Drizzle core devs promise they will follow the new coding style. 3. Reviewers promise they will not let new code pass if it doesn't adhere to coding standards. Note that new contributors will submit patches in the string &foo way because that's how most people always do it, so the reviewers really have to commit to this to prevent total anarchy. So I don't expect any of the above points will actually happen. I just wanted to spend a minute while waiting for a compile to finish and say that I absolutely support you in spirit, but only in spirit :-) >> return (x == MY_TYPE); > > Is there any need for those parentheses? One could argue they help readability. At least it is not a misleading convention like string &foo. This is not an issue either way -> keep it as it is. henrik -- [email protected] +358-40-8211286 skype: henrik.ingo irc: hingo www.openlife.cc My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559 _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

