First Draft: ref For Variable Declarations

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu May 2 07:06:34 UTC 2024


On 02/05/2024 6:58 PM, Walter Bright wrote:
> I forgot to mention: ref's are not rebindable:

And this is why we should expand upon alias instead.

```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.

Which could be quite cool.


More information about the dip.development mailing list