News for hackers. Stuff that matters.
Re:Functional programming is finally going mainstream by Akronymus on Wednesday July 13, 2022 @09:21AM (#32082295)
> What you're referring to is more of what happens when someone is writing functional code in a language that's not functional.

And even then, there is the question of whethwr it is a deep or shallow copy on receiving or write.

Re:Functional programming is finally going mainstream by deltaonenine on Wednesday July 13, 2022 @02:03PM (#32086453)
just pass a const reference. It's immutable anyway.
Re:Functional programming is finally going mainstream by Akronymus on Wednesday July 13, 2022 @02:21PM (#32086736)
Unless that ref holds a mutable reference. C++ doesnt make it easy at all to have something be truly immutable.