Here is what I think. How the thing is actually passed don't matter. What does matter is that the semantic is know : ie that the program will behave in a known way.
I agree.

As a consequence, if the compiler choose to pass by ref instead of passing by value as an optimization, it must do so only if it can prove that the resulting code will do the same thing.
And how could it be proved? IMO with const (not mutable) scope (no escaping). What are your thoughts?

Reply via email to