Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
IshKebab
· 8mo ago · 0 comments
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).
Comments
[–]
functional_dev
8mo ago
What about rust
const fn()
? I think it guarantees there are no side effects
[–]
IshKebab
OP
8mo ago
I think you're right. Equivalent to C++'s constexpr.