DIP69 - Implement scope for escape proof references

ixid via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 5 06:54:50 PST 2014


On Friday, 5 December 2014 at 14:10:44 UTC, bearophile wrote:
> ixid:
>
>>> void foo(int[2]) {}
>>> void bar(int[]) {}
>>> void main() @nogc {
>>>   foo([1, 2]s);
>>>   bar([1, 2]s);
>>> }
>>
>> That is a rather unfriendly syntax, it is the kind that 
>> degenerates into noise with other structures.
>
> Can you show an example of the noisy code it causes?
>
> And are you able to invent something succint that is better?
>
> Bye,
> bearophile

[1,2].stack
stack [1,2]
@stack [1,2]
[1,2]stack


More information about the Digitalmars-d mailing list