Y
Hacker News
new
|
ask
|
show
|
jobs
by
tjwii
3092 days ago
I think immutability of arguments should be optional by using a const keyword, like in c:
int add(const int a, const int b);
2 comments
bmm6o
3092 days ago
The downside to this syntactic approach is that the implementation details are leaked in the signature.
link
Can_Not
3092 days 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.
link