Apologies for the basic question, and I'm sure there is a good reason for this, but I'm wondering if its written up somewhere? I went looking for an issue or something with discussion but was wondering if anyone had anything to point me to.
Feels inconsistent to me that adding a * flips the assumption from const-by-default to mutable-by-default for arguments.
IE if I have:
fn some_func(
// const, contents of some_type aren't mutable (ie, can't arg1.field += 1)
arg1: some_type,
// contents of pointed at some_type are mutable. (arg2.field += 1 is ok)
arg2: *some_type,
// const again (arg3.field += 1 is not ok)
arg3: *const some_type,
// but ? doesn't add mutability
// (arg4.field += 1 is not ok)
arg4: ?some_type,
) void
{
...
}
