const
Word family
- constantadjectiveB1
- constantlyadverbB1
- constancynounC1
Synonym discussion
Sense: noun/1
All three terms label values that should not change in programming, but they belong to different languages. 'const' is the general-purpose keyword in C, C++, and JavaScript — it is the most widely recognised and appears in the oldest code bases. 'final' is the Java equivalent and carries the same meaning, but Java developers never use 'const' for this purpose, so learners moving between languages must switch terms. 'readonly' appears in C# and TypeScript and is slightly more flexible: a readonly field can be assigned at declaration or inside a constructor, whereas a const value in C++ or JavaScript must be set at the point of declaration. In everyday usage, 'const' is what most programmers reach for first, while 'final' and 'readonly' are language-specific alternatives that mean the same thing for practical purposes.
Common collocations
Nouns
- const value
- const variable
- const schedule
- U.S. Const.
Phrases
- mark with const
- delays in const.
Prepositions
- const. of
- under const.
Etymology
'Const' is a shortened form of the English word 'constant', which comes from the Latin 'constantem' (meaning 'standing firm' or 'unwavering'). The abbreviation has been used in technical and legal writing since at least the 19th century to save space in notes, tables, and citations. Its modern use as a programming keyword dates from the 1970s when the C language introduced 'const' as a type qualifier.