» Conventions.CodingStyle
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Conventions.CodingStyle

French | Italian | Spanish

For better readability and standardization of VVVV related code we should all conform to the coding styles below:

Casing

Definitions

Pascal Casing

 RedHotChilliPeppers

Camel Casing

 redHotChilliPeppers

Classes

  • Pascal Casing
//good
class RedHot
 
//bad
class TRedHot
class redhot

Interfaces

  • start with an I (for Interface) and then Pascal Casing
//good
interface IRedHot
 
//bad
interface RedHotInterface
interface Iredhot

Class Variables

  • start with an F (for Field) and then Pascal Casing
//good
int FChilliPepper
 
//bad
int ChilliPepper 
int FchilliPepper

Local Variables, Function Arguments

  • Camel Casing
//good
int redPepper;
void Foo(int barCode);
 
//bad
int Redpepper;
int RedPepper;
void Foo(int BarCode);

Global Variables

  • start with a G and then Pascal Casing
//good
int GChilliPepper;
 
//bad
int ChilliPepperGlobal;
int GchilliPepper;

Functions

  • Pascal Casing
//good
PlayMusic();
 
//bad
playMusic();

Events

  • start with On.. and then Pascal Casing
//good
OnExplode
 
//bad
Explode
Onexplode

Events Callbacks

  • are named like their corresponding Events
  • end with ..CB
//good
ExplodeCB()
 
//bad
ExplosionCB()
explodeCB()

Braces

  • braces are always in a new line
//good
if true then
{ 
 ...
};
 
//bad
if true then { ... };
if true then {
   ...
 };

Indenting

  • always use 4 spaces

Spacing

  • there is always a single space after a comma or a semicolon, never before
//good
MyFunction(a, b);
 
//bad
MyFunction( a , b );
  • single spaces surround operators (except unary operators like increment or logical not)
//good
a = b;                       
for (int i = 0; i < 10; ++i) 
 
//bad
a=b;                             
for (int i=0; i<10; ++i)

Other Coding Guidlines

Note that certain incompatibilities to the similar guides listed below (which differ among themselves aswell) are deliberate.

Mono Coding Guidlines

.Net Design Guidlines

Sharp Develop Coding Guidlines

anonymous user login

Shoutbox

~2d ago

joreg: @microdee: yep i think the site takes user submissions..

~2d ago

microdee: @joreg: it's missing FlareTic... ;)

~2d ago

joreg: @motzi yeah, welcome to my life..

~2d ago

motzi: @joreg: i'm tempted to look into PraxisLIVE :)

~2d ago

joreg: @u7: no worries, we'll still be here when you everyone comes back...

~2d ago

u7angel: @joreg, are u trying to get rid of the community ? :)

~2d ago

joreg: bored of #vvvv? try some alternatives: https://alternativeto.net/software/vvvv/

~4d ago

tonfilm: @beyon you can also use F# together with #vl, see: #fsharp #dotnet #visualprogramming https://github.com/vvvv/VL.DemoLib/tree/master/src/VL.FSharpDemoLib

~4d ago

beyon: tonfilm: Ok,currently using F# though but maybe I should look into sharpdx vs xenko math

~5d ago

tonfilm: @beyon #vl also fills these gaps with huge range of collision detection math from #sharpdx which is basically the same as #xenko's