From: Kristian Nielsen Date: June 29 2009 10:55am Subject: Re: MySql coding style: Request for deprecation of UPPERCASE typedefs List-Archive: http://lists.mysql.com/internals/37033 Message-Id: <87zlbrwbpq.fsf@knielsen-hq.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mats Kindahl writes: > Just to clarify, when we mention forward declarations here, we are talking about > forward declarations of *classes* only, not variables, so the "extern int foo" > is not an example of a forward declaration we are considering. For functions and > variables, it is a requirement to use an include file. Mats, could you describe what the benefits are of using forward declarations of structs/classes in place of #including the definition? Clearly, self-references in structs (whether direct or recursive) require forward declarations, but otherwise? It seems to me to be a simpler if code referencing struct/class FOO would always do so by including file_defining_FOO.h? What am I missing? I don't remember seeing this style much in C/C++ code... (More generally, I think your proposal would benefit from explaining more concretely what problems you are trying to solve. Clearly there are some real issues that are being addressed, like the possibility to use parts of the server code in unit tests that has been hinted at. It seems to me that the proposal mixes some changes needed to solve concrete problems with other changes that are more a matter of style and preferences). - Kristian.