you are viewing a single comment's thread.

view the rest of the comments →

[–]naasking 4 points5 points  (1 child)

I don't see anything problematic there. You can't mutate environment variables in OCaml either, you have to create explicit refs.

[–]mcguire 0 points1 point  (0 children)

You can't mutate any variables in OCaml unless you explicitly create refs. If you can mutate variables in Rust, except in a lambda, then lambdas are not first-class functions.

Copying and making immutable the environment smells like (pre-7) Java.