Hacker News new | ask | show | jobs
by nyanpasu64 1417 days ago
If you call a function with `f(large_struct, &large_struct)` and f() mutates through the second/pointer argument before reading the first/value argument, will its value change even though the function signature looks like a pass-by-value?
1 comments

Too late to edit, but related: https://news.ycombinator.com/item?id=27089184, immutable pointer aliasing, https://github.com/ziglang/zig/issues/4021.