Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » is there U++ coding style reference?
Re: is there U++ coding style reference? [message #27824 is a reply to message #27786] Thu, 05 August 2010 12:50 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 03 August 2010 06:50

compact code is a good thing, no doubt. but having braces on new line sets the commands apart from the invoker..kind of a structural helper. in any case, this might be one of the points where mirek could give an advice to have kind of a guideline..

here for comparison:
	if(a = 123)
	{
		int abc = 3345;
		for(int i = 0; i < 123; i++)
			abs += i;
	}

	if(a = 123) {
		int abc = 3345;
		for(int i = 0; i < 123; i++)
			abs += i;
	}



I certainly use more compact style.

Anyway, w.r.t. to formatting style guidelines, in the very very old past I was irritated when somebody submitted something with different formatting.

Later I have found that it in fact helps me to distinguish my code from other people just by seeing the formatting style Smile

After this, I just do not care. Just produce a good code. If I feel too uncomfortable, I will reformat. By doing this I will also mark for me the code as "checked" Smile Smile

[Updated on: Thu, 05 August 2010 12:51]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: using Ctrl::Add; required for templates / overloaded virtual functions
Next Topic: dll instead of exe
Goto Forum:
  


Current Time: Wed Jun 05 14:46:37 CEST 2024

Total time taken to generate the page: 0.01676 seconds