Home

UPPERSNAKECASE

UPPERSNAKECASE is a naming convention used in programming to denote identifiers that are constants or fixed values. It is commonly known as screaming snake case or upper snake case. In this style, words are joined by underscores and written in all capital letters, with no spaces or punctuation beyond the separating underscores. Examples include MAX_VALUE, DEFAULT_TIMEOUT, and DATABASE_URL.

This convention derives from snake_case, where words are lowercase with underscores, but here the entire identifier

In practice, UPPERSNAKECASE is recommended for constants, macros, and environment variable names in many style guides.

Common variants and synonyms include SCREAMING_SNAKE_CASE, UPPER_SNAKE_CASE, and UPPERCASE_WITH_UNDERSCORES. It is important to maintain consistency within

is
uppercase
to
signal
constancy.
It
is
widely
used
across
languages
and
codebases
to
distinguish
constants
from
variables
and
other
identifiers.
For
example,
Python's
PEP
8
suggests
module-level
constants
be
named
in
uppercase
with
underscores;
Java
constants
are
typically
written
in
uppercase
with
underscores
as
well.
However,
not
all
languages
enforce
this;
some
alternatives
use
camelCase
or
PascalCase
for
constants
depending
on
the
language's
idioms.
a
project,
and
to
avoid
using
this
convention
for
non-constant
identifiers,
where
readability
and
language
conventions
may
favor
other
styles.