Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 1411

For questions about designing languages where data values are immutable and cannot be changed, or implementation aspects specifically related to immutability

3 votes

Why do some languages have both immutable "variables" and constants?

"Immutable" may have been a misnomer originally in the sense that there is a run-time mutation, although in usage the term "immutable" has come to mean "mutable once only". … Constants are immutable across all executions of a particular compiled program, whereas immutable variables are only necessarily immutable for the lifetime of a single run of the program. …
Steve's user avatar
  • 778
5 votes

Would it be safe to introduce the "freeze" statement?

The basic idea that it should be possible to lock data from modification is sound. It is often the case that data structures have to undergo a progressive building process, during which time elements …
Steve's user avatar
  • 778