C is Brittle D is Plastic
Derek Fawcus
dfawcus+dlang at employees.org
Mon Mar 23 09:43:58 UTC 2026
On Monday, 23 March 2026 at 01:51:40 UTC, Walter Bright wrote:
> On 3/22/2026 10:19 AM, Derek Fawcus wrote:
> LLMs don't really solve the problem, as the wrangled C code is
> just as ugly looking.
In the example I cited, that was not an issue. I was able to
tightly specify the replacement, such that it effectively added
as an editor "search and replace" facility on steroids. So the
result was exactly what I would have written.
I'm still in the process of evaluating LLM based agents in my
workflow, but the above is one where I have concluded they are
useful. The one detrimental issue being the volume of change
which may result from a global application to fix a poor pattern.
However, for your quoted example, that would not arise. As there
would only be the one (or small set of) function(s) implementing
the algorithm to be changed, together with use of _Generic hidden
by a macro to catch all of the call sites.
Only if that algorithmic change the proved to be valuable would
it then be worth the cost of updating the call instances, and
eliminating the _Generic using macro. Then there the review cost
for the LLM generated diffs would be minimal.
As to using an LLM agent to produce 'original' code for a
project, I'm still skeptical.
More information about the Digitalmars-d
mailing list