No mutable types? So like… no lists? no for … i++?
I get that there are alternative approaches, but I don’t quite see why you’d want to go to that extreme with this idea? It’s useful for some applications but even for a simple video game it’s likely not helpful.
No mutable types? So like… no lists? no for … i++?
I get that there are alternative approaches, but I don’t quite see why you’d want to go to that extreme with this idea? It’s useful for some applications but even for a simple video game it’s likely not helpful.
It’s perfectly possible to work without mutability.
Is it desirable to be entirely without it? Probably not, but leaning immutable is definitely beneficial.
Yeah, copying can totally screw you over. Mutability is fine, just make sure it’s safe (e.g. what Rust does).
Pure functional programming is often like this.
Erlang/Elixir doesn’t have muteable variables/types. Appending to a list would just create a “new” lists.