Proposal for design of 'scope' (Was: Re: Opportunities for D)

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 13 07:37:57 PDT 2014


On Sun, Jul 13, 2014 at 12:07:58PM +0200, Jacob Carlborg via Digitalmars-d wrote:
> On 2014-07-11 16:29, H. S. Teoh via Digitalmars-d wrote:
> 
> >Because the scope of the parameter 'obj' is defined to be the scope
> >of myFunc only, according to the current proposal.
> 
> Wouldn't it be possible to define the scope of a parameter to the
> caller's scope?
[...]

We could, but how would that help static analysis within the function's
body, since the caller's scope is unknown?


T

-- 
Truth, Sir, is a cow which will give [skeptics] no more milk, and so they are gone to milk the bull. -- Sam. Johnson


More information about the Digitalmars-d mailing list