News for hackers. Stuff that matters.
Re:John Carmack on Mutable Variables by Fire-Dragon-DoL on Friday October 31, 2025 @03:18AM (#45769193)
In typescript and js you get immutable references, but the data is mutable. Definitely not the same thing
Re:John Carmack on Mutable Variables by dougherty on Friday October 31, 2025 @05:19AM (#45769942)
You have `as const`. Yes I know it's not enforced at runtime, but the type system does support it.
Re:John Carmack on Mutable Variables by danenania on Friday October 31, 2025 @08:37AM (#45771358)
There’s Object.freeze for enforcing at runtime.