List:Internals« Previous MessageNext Message »
From:Ingo Strüwing Date:March 17 2009 11:56am
Subject:coding style change proposal: function parameter names in headers
View as plain text  
Hi,

I propose to demand function parameter names in header files.

We do not document functions in header files. The documentation goes to
the C/C++ file where it is defined.

With parameter names in header files, one would not need to look up the
source file for every function call.

Example:

  Restore_info* prepare_for_restore(String*, LEX_STRING,
                                    const char*, bool,
                                    const char*);

This declaration forces me to look into kernel.cc whenever I want to
call it.

  Restore_info* prepare_for_restore(String *backupdir,
                                    LEX_STRING orig_dir,
                                    const char *query,
                                    bool with_compression,
                                    const char *comment);

In this case there is a good chance that I do not need to consult the
function comment in the source file.

Regards
Ingo
-- 
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer
Vorsitzender des Aufsichtsrates: Martin Häring   HRB München 161028
Thread
coding style change proposal: function parameter names in headersIngo Strüwing17 Mar
  • Re: coding style change proposal: function parameter names inheadersSergei Golubchik17 Mar
    • Re: coding style change proposal: function parameter names in headersMARK CALLAGHAN17 Mar
      • Re: coding style change proposal: function parameter names in headersJay Pipes17 Mar
      • [style] change proposal: function parameter names in headersKonstantin Osipov17 Mar
    • Re: coding style change proposal: function parameter names in headersIngo Strüwing17 Mar
      • Re: coding style change proposal: function parameter names inheadersSergei Golubchik17 Mar
  • [style] change proposal: function parameter names in headersKonstantin Osipov17 Mar
    • Re: [style] change proposal: function parameter names in headersIngo Strüwing17 Mar
    • Re: [style] change proposal: function parameter names in headersMats Kindahl18 Mar
      • Re: [style] change proposal: function parameter names in headersKonstantin Osipov18 Mar
        • Re: [style] change proposal: function parameter names in headersMARK CALLAGHAN18 Mar
      • Re: [style] change proposal: function parameter names in headersIngo Strüwing18 Mar
        • Re: [style] change proposal: function parameter names in headersMats Kindahl18 Mar
          • Re: [style] change proposal: function parameter names in headersReggie Burnett23 Mar
        • Re: [style] change proposal: function parameter names in headersMichael Widenius8 Apr