Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Code completion suggestions via IntelliCode comes to C++ in Visual Studio 2019

Save for later
  • 2 min read
  • 10 Dec 2018

article-image

Last week, Microsoft announced in a blog that IntelliCode code completion suggestions will come to Visual C++ in Visual Studio 2019.

There are some common usage patterns that occur after coding for some time. For example, an open stream will be closed eventually. When a string is used in the context of an if-statement, it is usually to check if the string is empty or has a certain size. Developers identify and use these coding patterns over time. IntelliCode already knows these common patterns and can suggest them to the developers as code.

With the help of machine learning, IntelliCode trains over thousands of real-world projects which includes open-source projects on GitHub. So, IntelliCode will be of most help to developers when using common libraries like STL. IntelliCode saves time by putting most used items on the top of the IntelliSense completion list.

On using the IntelliCode extension for a while, starred items will begin to appear at the top of Member List. They are IntelliCode recommendations.

In a future release of the extension, Microsoft will give C++ developers the ability to let IntelliCode learn from their own code. They are also considering adding C++ IntelliCode support to Visual Studio Code. This is a welcome feature for developers, as it saves them time.

A comment on Hacker News reads: “That's very nice and I'll probably be using it a lot, after VS2019 will stabilize (it's just a preview now). However, the fact that this thing works so well, says a lot about the design of C++ standard library. They should have encapsulated the pair of iterators into a single structure, and implement implicit casts from vectors/arrays to that object. Requiring to type begin/end every single time is counterproductive.

For more details, visit the Microsoft Blog.


Visual Studio 2019: New features you should expect to see

Neuron: An all-inclusive data science extension for Visual Studio

Microsoft releases the Python Language Server in Visual Studio

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime