First Draft: ref For Variable Declarations

Nick Treleaven nick at geany.org
Thu May 2 16:45:04 UTC 2024


On Thursday, 2 May 2024 at 07:06:34 UTC, Richard (Rikki) Andrew 
Cattermole wrote:
> ```d
> int adder(int a, int b) {
> 	alias Perform = a + b;
> 	return Perform;
> }
> ```
>
> This is far more expected as a feature (I have tried to do 
> simple aliasing of variables with it in the past).
>
> It basically offers lazy expression inlining.

```d
ref perform() => a + b;
return perform;
```


More information about the dip.development mailing list