On Tue, 23 Jun 2009 14:02:09 +0200, Sergei Golubchik <serg@stripped>
wrote:
> 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
>
hmm, then we seem to agree after all :-)
-- didrik