Hi Vincent,

The Google C++ style guide has a requirement that I would suggest considering.


http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Function_Calls

The specific suggestion is that we provide guidance on how to wrap
function definitions and calls that don't fit well on a single line.
For example:

void
library_prefix_plus_object_type_plus_some_long_operation_name(Object_Type
object,

                         type1 value,

                         type2 value)
{
    <function body>
}

The wrapping is pretty annoying on this function definition and any
calls starting from some nested indentation level are going to be
really hard to wrap properly at 80 characters. The style guide
referenced suggests wrapping at the opening paren and double
indentation for the parameters to make them distinct from the body
contents.

void
library_prefix_plus_object_type_plus_some_long_operation_name(
        Object_Type object, type1 value1, type2 value2)
{
    <function body>
}

The call wrapping is similar:

    <leading body>
    library_prefix_plus_object_type_plus_some_long_operation_name(
            object, value1, value2);
    <remaining body>

Whether we use this style or not, providing guidance for these more
difficult situations would be very useful.

Nathan


On Sun, Aug 30, 2009 at 5:40 AM, Vincent Torri<vto...@univ-evry.fr> wrote:
>
> Hey,
>
> I think that we all agree that the current mix of whitespace and tabulation
> in most of the source code is not that very nice. Also, the libraries are
> often using the coding style of the original author, hence we have several
> different coding style in different libraries (eina being even worse, as it
> uses both raster and Jorge coding style...)
>
> As we plan to release the EFL, maybe it would be good to choose a common
> coding style and to modify the source code accordingly (preferably before
> the release, but that can be done after as it would be a lot of work).
>
> I have attached a proposal. The structure is based on the cairo coding style
> file (I have copy/pasted most of the sentences as I'm not an english
> speaker/writer, but I modified the examples of course...).
>
> Feel free to give your ideas, remarks, modifications, additions, etc... We
> are not in a hurry, so discussion is welcome, of course.
>
> Once we all agree on a coding style, i think that such file should be
> included in all EFL svn repo and future tarballs.
>
> regards
>
> Vincent
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to