IT lexicon › Programming › Constant

Constant

Programming På svenska → Updated: 2026-05-24

A named value that cannot change after assignment. Languages differ on compile-time constants vs runtime-immutable bindings.

const in C/C++/Rust/JS, final in Java, val in Scala/Kotlin. In JS, const only means the binding is immutable — the object it points to can still mutate. In Rust, const is always compile-time; let defaults to immutable but can be made mutable with let mut.

← Back to the lexicon