Update terminology around expression properties:
Implements the decision in #1391.
There are a few concerns with the current terminology:
:!, which share a number of
properties, and often we want to refer to those together.The concerns about the names of the individual phases led to questions-for-leads issue #1391: New name for "constant" value phase. This proposal implements the resolution from that issue.
The current names were introduced in proposal #1378: Design overview update part 7: values based on a discussion in #typesystem on Discord. I am not aware of corresponding terminology in other programming languages.
We update terminology around expression properties, specifically what we previously referred to as "value phase" and values it can have, as follows:
template parameters.By making these last two terms both end in "constant," we allow their combination (including all compile-time values) to be collectively referred to using the term "constant." For example, either kind of constant may be passed to a function with either kind of constant binding.
The goals of this proposal are:
This supports Carbon's goal of having Code that is easy to read, understand, and write.
We were happy with this option and did not spend time coming up with more alternatives.