Content deleted Content added
I added more information about the use of `const` in other programming languages, and specified that not only the mentioned ones are the ones who use it. |
m v2.04b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation) |
||
Line 1:
{{short description|Type qualifier}}
{{lowercase title}}
In the [[C (programming language)|C]], [[C++]], [[D (programming language)|D]], [[JavaScript]], [[Julia (programming language)|Julia]], [[Rust (programming language)|Rust]] [[Programming language|programming languages]], among others, '''const''' is a [[type qualifier]]: a [[Keyword (computer programming)|keyword]] applied to a [[data type]] that indicates that the data is read only. While this can be used to declare [[Constant (computer programming)|constants]], <code>const</code> in the C family of languages differs from similar constructs in other languages in being part of the ''type,'' and thus has complicated behavior when combined with [[Pointer (computer programming)|pointers]], references, [[composite data type]]s, and type-checking. In other languages like [[Rust (programming language)|Rust]], the data is not in a single memory ___location, but copied at compile time on each use.<ref>{{Cite web |title=Constant items - The Rust Reference |url=https://doc.rust-lang.org/reference/items/constant-items.html |access-date=2022-06-22 |website=doc.rust-lang.org}}</ref>
== Introduction ==
|