Sujet : Re: Microsoft CEO says up to 30% of the company's code written by AI
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.c++Date : 02. May 2025, 10:15:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vv22ei$ph09$1@raubtier-asyl.eternal-september.org>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
Am 01.05.2025 um 11:39 schrieb
Muttley@DastardlyHQ.org:
Indeed. Boiler plate code interface or GUI code isn't an issue even for 4GL
tools, the actual program logic is another matter. To tell an AI the fine
details of what you want the program to do you'd need to write such a
comprehensive spec you might just as well right the code yourself anyway.
However, code generators aren't needed for boilerplate code because
this code is trivial anyway. However, I've presented my code to ChatGPT
several times, and ChatGPT claimed to simplify it, but the ssimplifica-
tions contained errors. I mean, if an AI is already so overwhelmed with
less than 100 lines of code, things can only get worse with more complex
code.
I wrote something similar to an atomic<shared_ptr> myself and presented
it to ChatGPT, but ChatGPT was of the opinion that if I used atomics, it
could optimize away the locking. My implementation is only lock-free in
one common case: when updating a "shared_ptr<>" from an
"atomic<shared_ptr<>>" results in no change because the central
"atomic<shared_ptr<>>" hasn't changed, and in rarer cases, the lock
does.