News for hackers. Stuff that matters.
Re:John Carmack on Mutable Variables by JonChesterfield on Friday October 31, 2025 @07:51AM (#45771005)
I believe the standard counterargument goes:

- either it's transitive, in which case your type system is very much more complicated

- or it isn't, in which case it's a near useless liability

Naturally C++ runs with the latter, with bonus extra typing for all the overloads it induces.

Re:John Carmack on Mutable Variables by maleldil on Friday October 31, 2025 @12:06PM (#45773645)
How isn't it transitive in C++? If the variable/reference is const, you can't modify fields, and you can only call const methods. What else do you need?