▲ | seanbax 2 days ago | |
Lifetime parameters are necessary for borrow checking. And you need a special operator for initiating a borrow. You need immutability by default, because mutability everywhere violates exclusivity. | ||
▲ | Panzerschrek a day ago | parent [-] | |
You don't need special operator for initializing borrow. Calling a function like Foo(a) will initialize such borrow, if function parameter is mutable reference. The same is for creating local mutable reference. Mutability by default is good, but it's not strictly necessary. I repeat, you can just write "const" everywhere manually, except places, where mutation is needed. |