← Back to team overview

elementary-dev-community team mailing list archive

Re: Functions

 

I liked it, the style guide. Congratulations!

I think we should have a guide to function and variables names. We should
name it camelCase, with_underlines or another way?

And the empty line below the function declaration is important, I think,
'coz without it the code becomes very cramped and messy.

Congratulations once again for the excellent guide :D

(Sorry for the bad english :( )

2012/1/2 David Gomes <davidrafagomes@xxxxxxxxx>

> Ideally, for me, I'd love:
>
> public int my_function ()
> {
>   //Code
> }
>
> It's the best way because the parentheses are aligned, so I can see where
> the function starts and where it ends.
>
> However, I know most of you don't like it, we'll have to choose between
> these: (notice the empty line difference)
>
> void my_function () {
>
>   //Code
> }
>
> void my_function () {
>   //Code
> }
>
> I prefer first because it makes code more organized when there are lots of
> lines. Besides, we're already doing it in most of our code.
>
> http://goo.gl/l7a88 I'm also working on this. I decided I would do this
> because I'm a coding style freak. Code needs to be perfect and consistent
> along all of our applications. In fact, I can volunteer to fix all the
> dirty code we have (it's boring, but I don't care, I love doing it) in all
> our apps, but only after we have a coding style defined.
>
> Which one do you prefer? Thanks, discuss, and don't forget to "Reply to
> all".
>
>
> --
> David Gomes
>
> --
> 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
>
>

Follow ups

References