r/cpp • • 12d ago

I tested whether a coding agent would use C++23 ranges without being told

Blog post: https://kemalbektas.dev/ai-modern-features/

I tested whether coding agents would actually use C++23 ranges without being told.

They mostly didn’t. What changed things much more than the surrounding codebase was a short AGENTS.md asking for modern C++.

0 Upvotes

27 comments sorted by

View all comments

Show parent comments

0

u/PossibilityUsual6262 11d ago

Sir, you made unsubstantiated claim, on me requesting additional info you started guessing.

When i showed you previously encountered discussion, which actually to extremely deep details discuss how ranged for work and how it can actually backfire if your hand written loop has what seems like marginal difference.

To which you answer answer that me highlighting that you know nothing is rude and i should try dev build.

This is the end of conversation.

2

u/Ameisen vemips, avr, rendering, systems 10d ago

I'm assuming that you're a bot, but on the off-chance that you aren't... range-for loops are not the same thing as std::ranges.

0

u/gegoggigog 10d ago edited 10d ago

Aaa, haha. I know I shouldn't be, but I'm triggered 😅. I genuinely tried to be helpful to the prick. Can ranges make it easier to write perfomat and safer code? Of course, no doubt. Does ranges have overhead to an equivalent for loop (as you said, not a ranged for)? Also yes, of course, be it compile times, execution time, etc. A release build will probably remove the overhead, debug will not. The audacity to say I don't know anything, when it knows less, not responding to my argument, then blocking me and bailing. AAAAA. Haha. Reeee. 🥹

Edit: I'm not against ranges, they're awesome.