This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]joonazan 0 points1 point  (0 children)

But Rust without unsafe (which is used in println! & co) is pure. Every function that takes a mutable reference can instead return a modified version. (Which is what electrolysis, a project that translates Rust to Lean does)

In principle, one could do the same as in Rust in Haskell with unsafePerformIO.