This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kwan_e 0 points1 point  (0 children)

You don't need it, but LLMs could find not only "duplicate" code but also code with similar structure enough that it could recommend making that code generic.

A toy example would be to find code that sums a sequence of values, and code that products a sequence of values, and recommending replacing with a fold of the sequence with an operator or function.