| List: | Internals | « Previous MessageNext Message » | |
| From: | Tor Didriksen | Date: | June 23 2009 11:05am |
| Subject: | Re: MySql coding style: Request for deprecation of UPPERCASE typedefs | ||
| View as plain text | |||
On Mon, 22 Jun 2009 16:59:46 +0200, Sergei Golubchik <serg@stripped> wrote: > Hi, Tor! > > On Jun 22, Tor Didriksen wrote: >> hi >> >> "Structure types are typedef'ed to an all-upper-case identifier." >> Can someone explain the reasoning behind this? >> ALL_UPPERCASE_NAME says DANGEROUS_THIS_IS_A_MACRO to me, rather than >> struct/class. >> >> 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 ? > > Regards / Mit vielen Grüßen, > Sergei > Hi Sergei 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. -- didrik
