News for hackers. Stuff that matters.
Re:John Carmack on Mutable Variables by tayo42 on Friday October 31, 2025 @12:28AM (#45768441)
Using a big array has good performance though?
Re:John Carmack on Mutable Variables by kragen on Friday October 31, 2025 @01:07AM (#45768613)
Computer memory is already a big array. Probably what you are thinking of is that processing array items sequentially is a lot faster than following pointers, but in the cases I'm talking about, you end up using array indices instead of pointers, which isn't much faster.
Re:John Carmack on Mutable Variables by gf000 on Friday October 31, 2025 @05:56AM (#45770186)
Yeah, but now logic bugs can cause memory leaks, doing use-after-frees, etc, without any kind of tooling to prevent it (nothing like valgrind to catch them). Sure, they won't crash the program, but sending money from a wrong account is worse than a segfault, imo.