←back to thread

498 points azhenley | 1 comments | | HN request time: 0s | source
Show context
shmerl ◴[] No.45768080[source]
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. JonChesterfield ◴[] No.45771014[source]
Could be a compiler flag. -const-by-default. Would probably mean you need to scatter mutable across the codebase to get it to compile, but I expect some people would like to have every local annotated as const or mutable.