BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News The 6 Main Reasons to use VS2015 for C++ Development

The 6 Main Reasons to use VS2015 for C++ Development

Bookmarks

Today at Build, the presentation “6 Reasons Move your C++ code to VS2015” was given which discussed the new features in VS2015 that make it more useful to C++ developers compared to previous editions.  VS2015 has been continuously evolving since its initial release in July 2015 and the release of two successive updates have made significant improvements to the project as compared to its launch state.

The 6 reasons given for switching to VS2015 were presented in reverse order, starting with “#6 You will benefit from day one (No code changes)”.  These are perhaps the most important because they are available immediately simply by using VS2015 without requiring any code changes.  These benefits manifest themselves both on the compiler side via a Clean Build and on the linker side (which benefits the Edit-Build-Debug cycle).

When comparing VS2015 to VS2013, the VS2015 linker is on average 2X faster when performing a clean link for Non Whole Program Optimized (WPO) builds.  The VS2015 linker is multi-x faster (depending on the particular code based being used) for new edits thanks to support for incremental linking.  These improvements are due in part to providing incremental linking for static libraries and linker multithreading.

There are also some intelligent code optimizations that happen transparently on your behalf.  For example, the optimizer recognizes if-loops and will refactor them in the binary output.  Relatedly, the technique of Loop-if unswitching moves an if-loop outside of a for-loop—meaning that if the If statement evaluates to false the for-loop can be skipped completely.

The fifth reason is that VS2015 enables better productivity while writing C++.  These new features can be enabled via project properties, and once enabled provide the ability to select a code fragment that should be extracted into a new function.  If performed, the editor will also prompt you to update the corresponding header file to reflect your new function.  The new “Move definition location” feature moves the specified function definition from source file to header file or vice versa.  IntelliSense support has been improved to support single file browsing and there is an optional “New Database Engine” that can be enabled for faster IntelliSense look-ups.

The fourth reason given is improved debugging support.  Exception settings can be changed for greater control during debugging changes on how the debugger should treat exceptions when they occur.  Edit & Continue is available again (it was missing since VS2010) for 32 bit and 64 bit code when Update 1 is installed.  All of these editor enhancements are joined by greater compliance with modern C++ standards (the third reason to use VS2015). 

Keeping with the theme of Microsoft’s greater focus on Linux, the second reason to use VS2015 is its support for targeting Linux application development.  As a developer in VS2015, you are able to write code C++ in VS2015 and then deploy that code to a Linux VM (locally, on the network, or Azure) for compilation and debugging.  This supports the 3 major CPU architectures (X86 / X64 / ARM).

The final reason given to use VS2015 is based on Microsoft’s desire to position it as “The Choice” for mobile app development.  iOS projects started in XCode can be opened and edited in Visual Studio and still developed in XCode.  Using a similar procedure as is done for Linux support, an app can be edited locally and then deployed to a paired Mac for compilation, and debugging.  There is a current restriction that while you can debug C++ and Java within VS2015, you will have to switch between them—you can’t do both at the same time.

Rate this Article

Adoption
Style

BT