Enforced immutability: Difference between revisions

Content added Content deleted
Line 306: Line 306:
Dyalect supports creation of constants using "const" keyword:
Dyalect supports creation of constants using "const" keyword:


<lang dyalect>const pi = 3.14
<lang dyalect>let pi = 3.14
const helloWorld = "Hello, world!"</lang>
let helloWorld = "Hello, world!"</lang>


A constant can contain a value of any type:
A constant can contain a value of any type:


<lang dyalect>const sequence = [1,2,3,4,5]</lang>
<lang dyalect>let sequence = [1,2,3,4,5]</lang>


=={{header|E}}==
=={{header|E}}==