# \[Pitch #2\] Build-Time Constant Values

**URL:** <https://forums.swift.org/t/pitch-2-build-time-constant-values/56762>\
**Category:** Pitches\
**Created:** [April 14, 2022, 10:02pm UTC](https://forums.swift.org/t/pitch-2-build-time-constant-values/56762 "2022-04-14T22:02:40Z")\
**Posts on this page:** 1\
**Showing post:** 33

<div class="post-metadata">

**Author:** ![wowbagger](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/wowbagger/32/13847_2.png) [@wowbagger](https://forums.swift.org/u/wowbagger)\
**Post date:** [April 18, 2022, 2:58am UTC](https://forums.swift.org/t/pitch-2-build-time-constant-values/56762/33 "2022-04-18T02:58:33Z")

</div>

> [@stackotter](#):
>
> My main concern with `const` is not that it would be confused with let, but that reading `@const let name = "stackotter"` really doesn't tell me very much, assuming that I haven't seen `const` before. I probably wouldn't associate that with build-time evaluation of expressions and values (especially if I came from a language where it means something else). But if it was `@buildTime let name = "stackotter"` I think that most people would have a much better first guess at what that means. 'Build-time' isn't necessarily the best phrase for this purpose, but it is certainly less cryptic than `const` imo.
> 
> Also, if build-time mutation of values was added (as some were considering earlier), constant could become a bit of a misnomer.
> 
> It wouldn't be the end of the world if `@const` was chosen, but we're in a position to choose a nice descriptive syntax for this new feature, and the more intuitive the syntax is, the easier and faster it is to learn.

I want to add to this by by borrowing some other words of mine from the last pitch:

> [@\[Pitch\] Compile-Time Constant Values](https://forums.swift.org/t/pitch-compile-time-constant-values/53606/53):
>
> As many upthread have pointed out, "constant", which "const" is short for, is too close in meaning in English to "immutable". This in my opinion makes the feature less teachable if we use the `const` spelling, because both "constant" and "immutable" have been used in documentation to describe `let` properties/values/declarations.
> 
> A search for "constant" in the latest TSPL shows 340 result:
> 
> ![Screen Shot 2021-12-02 at 21.00.26](https://global.discourse-cdn.com/swift/original/3X/e/7/e7a58f6bf1219018dcff0bcaa78c5077d83c4a1b.jpeg)
> 
> I did not check each of the 340 results, but all those that I checked use "constant" for `let` . Meanwhile, "immutable" only shows up 3 times:
> 
> ![Screen Shot 2021-12-02 at 21.10.52](https://global.discourse-cdn.com/swift/original/3X/e/d/eda47196de698d908a7eb4b186ef9b9168dc6333.jpeg)
> 
> This shows a clear history of "constant" being used as the primary description for `let` . It will be difficult for people new to the language to learn that even though we call `let` "constants", we only write `const` for some of them in code, and they are treated differently from other "constants", because they're `const` . Even for people already familiar with the language, `const` in my opinion still messes with the mental model _after_ they have learnt about it. Because although writing in Swift is not writing in English, your understanding of the English word still seeps in when you use the word.

---

_[View the full topic](https://forums.swift.org/t/pitch-2-build-time-constant-values/56762)._
