In Groovy, it is possible to create an immutable using the groovy.transform.Immutable annotation. One possible use-case for this is when we want to create a object (with data initialized through the class constructor) that is passed to another application layer (e.g., service) but we don’t want that object modified in that layer.
Rust E0384 Cannot Assign Twice To Immutable Variable
By default, variables are immutable in Rust. This design helps up write concurrent codes and avoid common problems that come along with concurrency.