iooioioiooioio@fosstodon.org
Dec 1, 2026, 11:58 AMretooted Sophia J. Turner
Reading through the new #roc announcement this morning (congrats to the team!)
In their tutorial (https://www.roc-lang.org/tutorial/), I came across this example and went 🤔.
That to_str function is going to allocate memory. According to Roc, this isn't a side effect, but it sure feels like one. It can close the program and print a msg to the user (both side effects according to Roc).
Obviously, this isn't how functional languages like to think of side effects, but I think zig has won over my thinking.