List: | Internals | « Previous MessageNext Message » | |
From: | Sergei Golubchik | Date: | June 23 2009 12:02pm |
Subject: | Re: MySql coding style: Request for deprecation of UPPERCASE typedefs | ||
View as plain text |
Hi, Tor! On Jun 23, Tor Didriksen wrote: >>> >>> typedef struct foo { ... } FOO; >>> Is legacy C-style, and does not belong in a C++ style guide (imho). >> >> MySQL isn't all C++. >> >> What about the reasoning of avoiding two completely different coding >> styles in different parts of the server ? >> > I hope we can move to a situation where we write classes instead of > structs. By that I mean, well defined constructors/destructors, > public/private sections, no public member variables, etc. etc. > If the C part of the codebase still need the typedefs, then let's just > leave them there. You've missed the point. I mean that while browsing the code and jumping from, say, sql_select.cc to somewhere in mysys/ or strings/ one should not feel like he's moved to a completely different project with very different coding conventions. For example, type and variable naming style should be similar. But I am not saying that struct's should be typedef'ed in pure C++ code. Regards / Mit vielen Grüßen, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped> / /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect /_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028 <___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Häring