logoalt Hacker News

IshKebabtoday at 8:16 AM1 replyview on HN

No, Rust is the same as C++ in terms of tracking side effects. It doesn't matter that there are no parameters. It could manipulate globals or call other functions that have side effects (e.g. printing).


Replies

functional_devtoday at 11:14 AM

What about rust const fn()? I think it guarantees there are no side effects

show 1 reply