Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tjwii
· 8y ago · 0 comments
I think immutability of arguments should be optional by using a const keyword, like in c:
int add(const int a, const int b);
Comments
[–]
bmm6o
8y ago
The downside to this syntactic approach is that the implementation details are leaked in the signature.
[–]
Can_Not
8y ago
I think it would better if they were immutable by default and instead of making them const, you would mark them mutable or reference.