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 #27780 is a reply to message #27768] Tue, 03 August 2010 11:24 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
dolik wrote:
Quote:


Brackets are mostly on the same line



i disagree on that one Smile. i have the impression that finding corresponding brackets is esier when they are placed on new line each. i know that Assist++ marks brackets, but it's also a visual perception of blocks, that matters, and here the new line stuff is better.

another thing:

small functions have their implementation in .h file anyway, and on same line as definition, like
Ctrl& Enabled(bool enable = true) { enabled = enable; return *this; }

rule of thumb: >3 syntactical important statements >> separate definition and implementation properly.

(syntactical important statements: real function calls and variable calculations, return values not counted, return *this is no 'important syntactical statement, only a helper.)

what about template classes?
.h / .hpp / .cpp relation and handling

did you look up my tempc class on that? any comments?

[Updated on: Tue, 03 August 2010 11:25]

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:08:06 CEST 2024

Total time taken to generate the page: 0.02572 seconds