Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Aug 18, 2017 6:42 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Sep 07, 2008 8:56 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
To all commiters: please, try to respect indent style while commiting ! It takes a few second to check the diff just before the commit. Everyone has it's own indent style, even mine changed since I started Raydium, but it's very important (and easy !) to stick to the style of the project. It's not pleasant for others to read code where 2 or 3 coding styles are mixed.

To make it short: check, and double check your commits. Please.


Top
 Profile  
 
PostPosted: Sun Sep 07, 2008 9:06 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I know you are not friend of formatting tools. But maybe this could be a life-saver to style in raydium
If we choose a multiplatform GPL(or LGPL) formating tool and we freeze it on the contrib folder as an app we could declare it like the official style tool.
Even more we could do a simple script with the needed parameters. So keeping the style in raydium files could be as easy as :
./style_raydium.sh
before the commit

Anyway, yes, I'm working in the style rules document ;)


Top
 Profile  
 
PostPosted: Mon Sep 08, 2008 7:34 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Sorry :(

I've learned (long long time ago) that each block need his ident.

For pointer style, i'm not agree but i'll try to conform to raydium style.

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Mon Sep 08, 2008 5:10 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
ouille wrote:
For pointer style, i'm not agree [...]


As a C/C++ trainer, I must admit that the usual C style about pointers (char *a) now seems absolutely dumb to me.
"char* a" looks perfect to me, but is a common mistake for beginners to do things like "char* a,b" and suppose that b is a pointer. I supposed that's why the original K&R style is still used. In fact, the problem is not indent style ... it's the language ! :)

PS: I just learned that Raydium use the "Whitesmiths" indent style. Some "random" ref about that:
http://www.activeclickweb.com/whitesmiths/index.html (no, it's not random at all, I admit)


Top
 Profile  
 
PostPosted: Mon Sep 08, 2008 5:58 pm 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Quote:
As a C/C++ trainer, ... dumb to me.
"char* a" looks perfect to me, but ... :)


I'm totally agree, as C (not really c++) trainer i use char* a; char b; on an other line. It's the best way to explain pointer to my students (IMHO).

I'll try to see if code block can automaticaly format to whitesmith.

I think that vincente proposition is quite fine.

Have a nice day.
Ouille


Top
 Profile  
 
PostPosted: Mon Sep 08, 2008 9:29 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2590
Location: gnniiiii (Scrat)
If I may, I would like to repeat here what is my (simple) personal opinion about automatic-indentation applications (since we talked about that with vicente with private message, if I remember correctly).

Sometimes, you need to adjust indentation manually (*), not strictly following the indent rules, just because the code looks better like this and is more readable. Automatic tools just don't care about that.

That's not a total no-go with these tools, but I really think that it's quite easy to adapt our style to a specific project. I do it all day at work, in facts ;)

One can also use his "indenter" only on his part of the source code just before commiting. Some text editors allows to indent only the current selection for instance.

(*) multilines "if" statements, half(-half) tabulations, long lines, ...


Top
 Profile  
 
PostPosted: Tue Jan 27, 2009 8:04 am 
Offline

Joined: Sun Oct 09, 2005 10:46 pm
Posts: 759
Hello,

Really strange, i've recieved a mail about your last reponse today (27/1/2009).

More than four month for the mail to be delivered ;o)

Have a nice day.
Ouille


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group