News for hackers. Stuff that matters.
Re:John Carmack on Mutable Variables by MetaWhirledPeas on Friday October 31, 2025 @02:15PM (#45774996)
> If you need new values you just make new things. > If you want to do an operation on fooA, you don't mutate fooA. You call fooB = MyFunc(fooA) and use fooB.

The beautiful thing about this is you can stop naming things generically, and can start naming them specifically what they are. Comprehension goes through the roof.

Re:John Carmack on Mutable Variables by ErroneousBosh on Friday October 31, 2025 @06:53PM (#45777602)
Yes, but you can do that without having loads of stale copies of incorrect data lying around, presumably.
Re:John Carmack on Mutable Variables by MetaWhirledPeas on Monday November 03, 2025 @02:19PM (#45803192)
With techniques like method chaining you can avoid using a constant or a variable and just pass return values around.