Common scope for function's in{}, out(result){} and body{}

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 12 00:59:52 PDT 2014


bearophile, has common scope been already proposed?

I don't sure that I clearly understand you (my English is really 
poor),
I have assumed that code "immutable length = r1.length; //Error" 
shouldn't be compiled.

On Friday, 12 September 2014 at 07:32:11 UTC, bearophile wrote:
> Ilya Yaroshenko:
>
>>    immutable length = r1.length; //Error, can't use function 
>> parameters.
>
> Time ago it was argued that if the use of function parameters 
> is allowed there (to define constants), you have poor's man 
> pre-state ("old") in D.
>
> Bye,
> bearophile


More information about the Digitalmars-d mailing list