Languages Features Calendar About Lists Add Language
GitHub icon



Constants are a language feature.

Marking a type or identifier as immutable.

Languages with Constants include Java, JavaScript, C, C++, PHP, Ruby, Go, C#, Rust, Objective-C, Kotlin, Julia, Dart, Groovy, F#, Chapel, SystemVerilog, Angelscript, Apex, Eclipse Command Language, nimrod

Example from JavaScript:

const one = 1

Example from C++:

int const one = 1;

Example from Ruby:

# Constants in Ruby being with a capital letter. Will throw a warning or error, depending on runtime settings. Name = "John" # Not a constant name = "John"

Article source

PLDB - Build the next great programming language. v5.0.0 - Acknowledgements · Email · GitHub