| ▲ | zozbot234 2 hours ago | |
> Lifetimes are a global property and LLMs are not particularly good at reasoning about them compared to local ones. Huh? Lifetime analysis is a local analysis, same as any other kind of type checking. The semantics may have global implications, but exposing them locally is the whole point of having dedicated syntax for it. | ||
| ▲ | gf000 2 hours ago | parent [-] | |
> Lifetime analysis is a local analysis, same as any other kind of type checking That's what the compiler is doing. The developer (or LLM) is supposed to do the global reasoning so that what they end up writing down makes semantic sense. Sure, throwing a bunch of variants at it and see what sticks is certainly an approach, but "lifetimes check out" only proves that the resulting code will be memory safe, not that it actually makes sense. | ||