LLM's think we should have language tuples!
Timon Gehr
timon.gehr at gmx.ch
Tue Apr 1 19:26:53 UTC 2025
On 3/31/25 22:37, Nick Treleaven wrote:
> On Tuesday, 25 March 2025 at 04:44:15 UTC, Manu wrote:
>> What I loved is that its function returned a pair of ulong's, because
>> apparently it made an assumption that we had in-language tuples! I
>> wonder where it got that idea?
>>
>> We should learn from our AI overlords! :P
>
> Looks like Timon was working on his tuple implementation in February:
> https://github.com/tgehr/dmd/commits/tuple-syntax/
> Also:
> https://dconf.org/2023/slides/gehr.pdf#page=109
I was working a bit on unpacking, though I think it was mostly rebasing
to master after that had undergone refactorings. It is more or less
ready (and OpenD already pulled the current state), but there are
various small things to finish.
E.g.:
- expanding a zero-element tuple does not work properly yet (in general,
even unrelated to unpacking)
https://github.com/dlang/dmd/issues/20842
I though I would have time to maybe fix this, but got sidetracked
last time I attempted to see it through.
- Unpacking does not yet support auto-expanding, for example:
(AliasSeq!(int. int) x, int y) = tuple(1, 2, 3);
does not work yet.
- I need to write an extensive test suite and address anything it may catch.
- I have to write the DIP and suffer through the bikeshedding on the forum.
Of course, one way to continue would be to just write tests for what
works and pull this (e.g., behind a -preview switch) and to allow anyone
who can spend the time required to take over the polishing effort. In
general, I still fully intend to finish this, but I don't know when I
will manage to get it over the finish line at the level of quality I
think is perfect. It has already taken way too long, mostly because I
have not been able to focus on this for any significant amount of time
beside my day job and various other obligations.
More information about the Digitalmars-d
mailing list