Future of memory management in D
Steven Schveighoffer
schveiguy at gmail.com
Thu Nov 18 13:27:15 UTC 2021
On 11/18/21 8:07 AM, Ola Fosheim Grøstad wrote:
> On Thursday, 18 November 2021 at 13:05:02 UTC, Steven Schveighoffer wrote:
>> Let's adjust the straw in that man:
>
>
> How can you bind something global to a common identifier like ```i```?
>
> You are joking, right?
>
Ironically, `i` is almost never a global identifier. Using it for a
global identifier works because UFCS is not allowed on locals.
```d
import std.complex;
auto i(double v)
{
return complex(0, v);
}
void main()
{
int i = 5;
auto c = (6 + 2.5.i - 1 + 3.i) / 3.i;
}
```
-Steve
More information about the Digitalmars-d
mailing list