Introduce the feature of constants in Lucee

Description

We have two ways of dealing with constants. We can either replace constants at compile time with the actual literal or we can make sure at runtime, that a constant is immutable. Both approaches have their merit.
I would propose two approaches.
Final variables which can't be overwritten (similar to classes)
Constants that are replaced by the compiler.

Constants could either be defined in any .cfm file with the const keyword or only in the Application.cfc.
What we also can do is to introduce a notation for constants, so that the compiler notices used constants and marks them for recompilation, whenever the constant get's updated in the source code.

Status

Assignee

Unassigned

Reporter

Gert Franz

Labels

None

Priority

New
Configure