We can discuss the design first, and the plan according the implementation cost.

`T` is ref type.

1\. For any parameter `m` is not `mut T`

>   1. `let x = m` is fine
>   2. `var x = m` is disallowed
>   3. `var y; y.x = m` is disallowed
> 


2\. For proc return result

>   1. If `proc f(...): var T`, then the return value must be `mut` or `var`
>   2. If `proc f(...): T`, then the return value maybe `let` or [`mut` | 
> `var`], but cannot be both, the compiler judge the result is mutable or not 
> automaticly.
>   3. `let x = f(...)` can bind any type of return value, read only or mutable.
>   4. `var x = f(...)` can bind mutable return value only. 
> 

Reply via email to