News for hackers. Stuff that matters.
Re:John Carmack on Mutable Variables by ryandv on Friday October 31, 2025 @10:45AM (#45772528)
That's right - immutability enables equational reasoning, where it becomes possible to actually reason through a program just by inspection and evaluation in one's head, since the only context one needs to load is contained within the function itself - not the entire trace, where anything along the thread of execution could factor into your function's output, since anybody can just mutate anybody else's memory willy-nilly.

People jump ahead using AI to improve their reading comprehension of source code, when there are still basic practices of style, writing, & composition that for some reason are yet to be widespread throughout the industry despite already having a long standing tradition in practice, alongside pretty firm grounding in academics.

Re:John Carmack on Mutable Variables by adrianN on Friday October 31, 2025 @11:58AM (#45773559)
In theory it’s certainly right that imperative programs are harder to reason about. In practice programmers tend to avoid writing the kind of program where anything can happen.
Re:John Carmack on Mutable Variables by ryandv on Friday October 31, 2025 @12:10PM (#45773696)
> In practice programmers tend to avoid writing the kind of program where anything can happen.

My faith in this presumption dwindles every year. I expect AI to only exacerbate the problem.