July 2023
Intermediate to advanced
670 pages
17h 13m
English
Mutable data, that is, data that has a value that you can change over time as your program is running, is an idea that comes up more or less frequently in most programming languages. Mutability can allow you to write algorithms that are more efficient or more clear than their equivalents built without mutable data, but this mutability comes at a high cost, introducing a potential for any number of bugs that can cause programs to crash, or worse, to continue running while behaving incorrectly. Haskell, as a pure functional programming language, avoids mutability by default, but in some cases you’ll find that considered use of mutability can improve your programs.
When you decide to use mutable data ...