10.5.4 Naming Conventions

Naming conventions have been established for LilyPond source code.

Classes and Types

Classes begin with an uppercase letter, and words in class names are separated with _:

This_is_a_class

Members

Member variable names end with an underscore:

Type Class::member_

Macros

Macro names should be written in uppercase completely, with words separated by _:

THIS_IS_A_MACRO

Variables

Variable names should be complete words, rather than abbreviations. For example, it is preferred to use thickness rather than th or t.

Multi-word variable names in C++ should have the words separated by the underscore character (‘_’):

cxx_multiword_variable

Multi-word variable names in Scheme should have the words separated by a hyphen (‘-’):

scheme-multiword-variable

LilyPond — Contributor’s Guide v2.24.4 (stable-branch).