Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 574 Bytes

functions.md

File metadata and controls

32 lines (23 loc) · 574 Bytes

Functions

Functions follow the same rules as variables, which is camelCase.

ALL functions follow this rule, even static functions or member functions.

{% tabs %} {% tab title="C++" %}

class Foo {
public:
    void runNarwhal();
}

int getVersion();

{% endtab %}

{% tab title="Java" %}

public static void runsSomeWoawvering();
private int getHolesInWall();

{% endtab %} {% endtabs %}

Macros follow the same rules as a constant

Functions should ALWAYS be some sort of verb.

Use getters and setters effectively to achieve this.