--- Comment #17 from 2011-08-07 00:22:55 PDT ---
> const, immutable, shared etc. have a large effect on the semantics of a 
> program. The compiler gives you additional guarantees as a result. e.g. 
> immutable variables can't be altered and non-shared can't be affected by 
> other threads.


> However, the situation with your feature request is much different.


Consider a piece of code like this:

    bool process(string key, out string value);
    string value;
    if (process(key, value))

Now imagine that, later down the road, I decide to make 'value' actually become
a 'ref' parameter, because I want to use its initial value to, for example, set
the default value of the environment variable somewhere else, even though I
originally only wrote to it.

The code that calls process() is broken.

Wouldn't it be nice to have an 'out' indicator on 'value', which would give a
compile error when the code changes?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to