LLM's think we should have language tuples!

Nick Treleaven nick at geany.org
Fri Apr 4 14:07:19 UTC 2025


On Friday, 4 April 2025 at 13:59:52 UTC, Nick Treleaven wrote:
> Assigning to a tuple literal seems to be a no-op ATM:
> ```d
> void main()
> {
>     int a,b;
>     (a, b) = (4, 5);

That line lowers to:
```d
     tuple(a, b).opAssign(tuple(4, 5));
```
So it's assigning to a temporary tuple copy of a and b's data, 
rather than the fields by reference.


More information about the Digitalmars-d mailing list