Thursday, March 8, 2012

Visual C++ 11 Beta 1 Initial Thoughts

I've started giving Visual C++ 11 a bit of a workout, and there's much to like about it.

Stability might be improved over 10 - I'll withhold judgement on that one for the time being, however.

We've got range based for loops.  That's a nice improvement since the DP last year.  Now you can do things such as :

#include

auto main()
-> int
{
    //  TODO - discover why this doesn't show up on Task List.
    std::vector joe;

    for (auto bob : joe)
    {

    }
}
In the above code we can simply declare bob as a deduced type of the container joe.  Handy when you're iterating over your containers and don't want to repeatedly deal with dereferencing (sorry, indirecting through, according to N3362) an iterator.

Pity there's such a mess with the Task List comments not working.  I can't get a single one to show.
And I won't even elaborate on the fact that it says it will only report on the ones in open files.  Sheesh: I've got a solution.  Feel free to inspect it.

The support for a light and dark theme is nice.  A little interesting that it's just a two horse event, but still.  Alas, I've kinda shot myself in the foot here by overriding some of the backgrounds in order to force a dark background - I'll have to undo some of that in order to get this fully working (should I want a light theme, and I might some day if I coded when the sun was up).

I really like the fully fleshed out syntax highlighting.  Though I think I loved it more in the Developer Preview.  I'm sure I used to be able to set things as italics - the example of parameters being in italics is mentioned across the web, however the Beta most definitely doesn't have an italics setting, just bold.  I have a function definition in front of me that's never known the loving hand of italicisation.

Oh, the monochrome look.  That's right.  For those who haven't heard, the Visual Studio now uses about three shades of grey as its entire colour palette.  Outside of your code, that really isn't an exaggeration.  There's a dark grey, a light grey and a - wait for it - intermediate grey.  Icons have been drained of colour and general boxing and lines have been removed from dialogs to give them a slabs-of-grey-paint look.
It was a little WTF at first.  You start thinking that this is a feature they'll introduce for VS 11 in order to have colour introduced as a feature in VS 12.  But I have to say that after the initial surprise, you get used to it pretty quick.  It's distinctive.  Better, worse?  Not much in it for me at this point.

Microsoft have folded a lot of the VS 2010 Productivity Power Tools into the VS 11 release.  The theory goes they get some out-of-band feedback on enhancements and iterate them, then add them into the next release - and here we are.  Alas, one of my favourites was the document view scrollbar.  And since I don't have the Power Tool available for VS 11, that means I'm without the enhanced scrollbar altogether.
I don't have a picture handy of the VS 2010 Power Tool one, so here's an image taken of the scrollbar from the Sublime Text editor home page.  Very much the same sort of thing: I love being able to see the general structure, as well as search matches, bookmarks, breakpoints, etc.  Sublime's not a bad text editor btw, though I tend to prefer notepad++.



 Overall, Visual Studio seems pretty punchy and responsive, though the find all references is as slow as ever.

Note that the Beta that you download is Ultimate.  Which in some ways is a pity because that means it comes with a boatload of stuff that I am never going to see in day to day usage (since I'd be using something like Professional).  Still, it does give you an opportunity to see what you're missing, including the perf tools and architecture stuff.

There are quite a few changes, both in the IDE and in the language support, so it will take quite some time to really go through and explore what's there.  This has just been a quick write up to gather some thoughts, prompted by the discovery of some unexpected C++11 support in the form of range based for loops.




No comments:

Post a Comment