/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
John Carmack on mutable variables
(twitter.com)
498 points
azhenley
| 2 comments |
31 Oct 25 02:34 UTC
|
HN request time: 0.001s
|
source
Show context
shmerl
◴[
31 Oct 25 03:29 UTC
]
No.
45768080
[source]
▶
>>45767725 (OP)
#
Proposing making immutable by default in C or C++ doesn't make sense due to backwards compatibility reasons. New languages like Rust have easier time making better choices with immutable by default.
replies(4):
>>45768149
#
>>45768408
#
>>45771014
#
>>45773596
#
1.
NathanaelRea
◴[
31 Oct 25 04:22 UTC
]
No.
45768408
[source]
▶
>>45768080
#
They could just add a "use immutable;" directive that you place at the top of your file.
replies(1):
>>45768453
#
ID:
GO
2.
Pxtl
◴[
31 Oct 25 04:31 UTC
]
No.
45768453
[source]
▶
>>45768408 (TP)
#
C# does this with the null hole. I wish more languages would take a versioning approach to defaults at the file-level.
↑