elementary-dev-community team mailing list archive
-
elementary-dev-community team
-
Mailing list archive
-
Message #01128
Re: Coding Style parentheses exception
I have only seen your _David_ and _Dane_ replies not everyone... so ...
Also as I already told you "David" in IRC, but now I'm saying to
everyone:
If this project cares more of single space then the actual code quality
I'm telling upfront don't count with me. There are other projects were i
can work ...
Style is already a very personal thing to mess with. And I don't mind
following a standard of a given project. But at this level is just wast
of time and idiotic
not to mention that even the current projects established in Elementary
can't follow the current CGL wish kind shows that they are ineffective
towards developers actually concern/need.
Even in kernel development where changes have a larger impact are way
more loose then in here... Doesn't that tell you something ???
When I'm programming I care more on solving the actual problem then
rather bogging my mind with single space style related _issues_....
On Thu, 2012-09-13 at 17:55 +0100, David Gomes wrote:
> All those cases have been handled. It took less time for us to decide
> that this exception is a +1 than it took you to write that post, I
> don't think this is a waste of time.
>
> On Thu, Sep 13, 2012 at 5:40 PM, Darcy Brás da Silva
> <dardevelin@xxxxxxxxxxxxxx> wrote:
> I agree that we should have consistency but at this level just
> seems
> unproductive and a wast of time...
>
> I think the things that really make a difference in this
> situations are
> in cases like:
>
> if(condition){
> }
>
> vs
>
> if(condition)
> {
>
> }
>
> or in functions:
>
> return_type
> func_name(param, param) {
> }
>
> vs
>
> return_type func_name(param, param {
> }
>
> vs
>
> return_type func_name(param, param)
> {
>
> }
>
> or cases like
>
> if(cond) {
> }else if {
>
> }
>
> vs
>
> if(cond){
> } else {
> if(cond){
> }
> }
>
>
> now getting to the _single_ space level just seems rather
> picky.
> Also it's not like all current projects managed to correctly
> apply
> the CGL ...
>
> There are things far more important that have not seen being
> address.
> Such as warnings and unreachable code. But apparently they
> don't seem to
> be a problem since they are IN the submitted code. :/
>
>
>
> On Thu, 2012-09-13 at 11:07 -0500, Dane Henson wrote:
> > I agree that the space should only be on the first opening
> > parentheses, but not before the second. It looks cleaner to
> me.
> >
> > On Sep 13, 2012 8:32 AM, "David Gomes"
> <david@xxxxxxxxxxxxxxxx> wrote:
> > Hey there guys, attached is the elementary OS coding
> style (We
> > have this on a Google Doc, but the formatting is
> broken on it,
> > so I'm rewriting it with Writer to then port to
> Google Docs
> > again).
> >
> > I want to add an exception regarding the space
> character
> > before opening parentheses, and I want to know if
> you all
> > agree:
> >
> > Usually, we put a space character before opening
> > parentheses:
> >
> > public string get_text () {}
> >
> > if (a == 5) return 4;
> >
> > for (i = 0; i < maximum; i++) {}
> >
> > my_function_name ();
> >
> > Object my_instance = new Object ();
> >
> > However, if we have something like this:
> >
> > if ((e.state &
> Gdk.ModifierType.MOD1_MASK) != 0) {
> >
> > Before the second opening parentheses on that line,
> I didn't
> > put a space character because I think it looks quite
> bad. Do
> > you guys agree that when we have 2 parentheses in a
> row we
> > should not put a space character before the second
> one?
> >
> >
> > if ( (e.state &
> Gdk.ModifierType.MOD1_MASK) != 0) {
> >
> > That's how it would look like.
> >
> >
> > Thank youg uys.
> >
> > --
> > Mailing list:
> https://launchpad.net/~elementary-dev-community
> > Post to :
> elementary-dev-community@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe :
> https://launchpad.net/~elementary-dev-community
> > More help : https://help.launchpad.net/ListHelp
> >
>
>
> --
> Darcy Brás da Silva <dardevelin@xxxxxxxxxxxxxx>
>
--
Darcy Brás da Silva <dardevelin@xxxxxxxxxxxxxx>
Attachment:
signature.asc
Description: This is a digitally signed message part
Follow ups
References