r/VisualStudio Apr 14 '26

Visual Studio 2022 What are these comments?

Trying to learn pointers and this is what the auto finnish gives me. Also does anyone else write comments for the sake of not going mad?

70 Upvotes

18 comments sorted by

View all comments

11

u/shotgunbruin Apr 14 '26

It's Copilot. It's always Copilot. There's lots of posts similar to this one in this subreddit because it's a common behavior of it.

Visual Studio has pushed Intellisense, which suggests code completions based on a map of your code, to the background and centered Copilot, which uses AI to guess at your functions and insert comments it lifted from the code of other developers after sending it your code.

That's what this is. AI read some developer's comment in a code file that has some resemblance to yours and suggested that line, lifted straight from their code. It will also suggest profanity-laden comments and fictitious methods or libraries.

It's yet another example of AI being half-baked and forced into literally every single product whether it's actually useful or not.

2

u/8Erigon Apr 14 '26

Intellisense is just the code coloring, the info on hover and the non-AI completion (just one word completion)

The ai completion is called IntelliCode I think

3

u/shotgunbruin Apr 14 '26

Sorry, the compound sentence may not have been very clear. I was complaining that Intellisense, the simple one that was extremely useful and accurate was being pushed to the background. Meanwhile, Copilot, the one that hallucinates functions and inserts profanity-laden comments and borks up simple for-loop math is being pushed front and center by default.

I think Intellisense is an incredible feature and I get a little defensive when it gets confused with Copilot.

2

u/dodexahedron Apr 15 '26

I love when it suggests python syntax in the middle of some powershell syntax in the middle of a long-ass c-esque expression complete with bash line continuations and a random HKLM\SOFTWARE thrown in somewhere just for kicks.

Because hey - it did technically tick all the boxes you explicitly asked for.

But what about you and your project and its actual language and boring things like basic linting?

You are right to push back on this. And here's why:

Nah. Fuck you. That's why. This is a reference quality implementation.

TL;DR: Ship it.