logoalt Hacker News

CharlieDigitalyesterday at 11:35 PM1 replyview on HN

Flip side: LLMs have to be very explicitly told to code in "modern" .NET and C# due to lack of representation in the training set.

Case in point: extension members from C# 14 is one that LLMs commonly stumble on and requires an explicit example. It still sometimes says that this is not valid syntax.

    extension(SomeType instance)
    {
        public OtherType DoSomething() { ... }
    }
Agents really struggle on this one for some reason.

Even older releases have a few that I notice LLMs making mistakes on like use of `System.Threading.Lock` over `Object` when locking.


Replies

merbtoday at 12:33 AM

With Claude I never had that problem. However Claude does not use the pattern by default