axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <sam...@wso2.com>
Subject Re: [Axis2] Coding convention
Date Wed, 22 Aug 2007 04:42:43 GMT
Dumindu Pallewela wrote:
> Hi Samisa,
>
> Thanks for taking the initiative. I think it's good to automate the 
> styling. Used the right way, it would make the code easily readable.
>
> I like the indent that you have proposed except for few things that I 
> have mentioned below.
>
> 1. Why are we using 100 as the line length? It is 80 in almost all the 
> other projects. I know that it is not a big issue when running vi or 
> such other editor in the X mode, but I think this may lead to code 
> containing a few really long and sparse lines. And possibly problems 
> viewing the code in other environments. I would prefer sticking to 80 
> as it has been used for a long time as a rule of thumb and it seems to 
> have worked :)
>
> 2. I think the programmer needs to have more control over line breaks. 
> For instant, if I use the indent that you have given, as it is, for 
> the following fragment of code:
>
> axiom_namespace_t **tmp_stack = (axiom_namespace_t **)
>    (AXIS2_MALLOC(ctx->env->allocator, sizeof(axiom_namespace_t *) * 
> size));
>
> it gives
>
> axiom_namespace_t **tmp_stack =
>    (axiom_namespace_t
>     **) (AXIS2_MALLOC(ctx->env->allocator, sizeof(axiom_namespace_t *) 
> * size));
>
> this happens because of the given parameter -nhnl, not to honour the 
> new lines. Using -hnl instead, the code stays as it is in the original 
> and it looks better to me.
>
> So basically, I am +1 for this indent with -nhnl changed to -hnl and 
> -l100 to -l80.
Thanks for the feedback. I am OK with -l80 and -hnl

Samisa...

-- 
Samisa Abeysinghe : WSO2 WSF/C
"http://wso2.org/projects/wsf/c?WSO2&nbsp;Web&nbsp;Services&nbsp;Framework/C&nbsp;-&nbsp;Open&nbsp;source&nbsp;C&nbsp;library&nbsp;for&nbsp;providing&nbsp;and&nbsp;consuming&nbsp;Web&nbsp;services"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message