Advertisement

VS2010

Started by December 12, 2009 04:00 PM
10 comments, last by Fiddler 14 years, 10 months ago
Being on a bit of a slowpoke and unreliable connection for the time being I don't really want to undertake the task of downloading it just now. I'm sure there's plenty of people who have the beta and have given it a try, though. I'd be interested in first-hand C++ oriented comparisons/impressions vs 2008. Is it worth the buck? Anything overly exciting one should be aware of (better internal word completion/intellisense perhaps?)? IMO 2008 is a wonderful product - does 2010 manage to a rabbit out of the hat?
I tried the latest beta in a virtual machine and it ran like molasses.
I don't know if it's because the GUI has been rewritten using WPF or what?
Anyways, yes intellisense has been totally rewritten.
I just had time to run a couple of programs but I do know that they definitely made changes because a simple program where I used the M_PI constant for the value of pi compiled fine in VS2008 but gave an error in 2010. I needed to rearrange the order of my header files to fix.

Anyways you might want to check out the Visual C++ Team Blog since they do a decent job of covering what they are up to in the new version.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Advertisement
Does the new intellisense/auto-complete compare anywhere closely to VisualAssist (which IMO is way overpriced, but damn useful)? In 2008 VA outperforms the default syntax handling (and coloring) a thousandfold. Which really is a shame.

As for the immediate C++0x features that caught my eye... Is it me or am I the only one who thinks these will obfuscate code more than they will help.

Autos are fine if you're not familiar with the code; personally I can't recall a situation where I needed to backtrack to look up a type except in some marginal situations where I've accidentally mixed up signed and unsigned iterators and the compiler starts generating warnings. Templates might be a different case here, though.

Lambdas? I guess I'd have to get used to them and see them in action, but from the descriptions and screenshots they look like a massive way to write code that is just "cool" (read: difficult) to read. Or I might not be getting the implications.

Decltype - can't really comment on this as I'm used to taking care of my type coherence and use casting when appropriate. Also, I don't generally need to use templates which is the context these are demonstrated in. So I might be missing something again.

Modifiable rvalues, on the other hand, are a massive yay.
I haven't used VisualAssist, but I've seen 2010's C++ Intellisense handle complex templates that 2008 never understood. Go To Definition and Find All References also work now.

Find In Files is also significantly faster.

Quote: Original post by irreversible
IMO 2008 is a wonderful product - does 2010 manage to a rabbit out of the hat?


I don't know, but it does manage to a word out of your sentence.
No complaints so far. They've rearranged some of the options around. The C++ include and library directories can now be accessed in project's properties. Intellisense is actually useful and can spot errors before you even compile (although can drain processing power). Since the Intellisense is so good, I just use Visual Assist Addin for Microsoft Visual Studio 2010 (beta) for the syntax highlighting, keyboard shortcuts, and refactoring. Changing the syntax highlighting colors will only take effect after the next start of the IDE, which is sort of a bug. The C++ compiler is also updated and broke some library dependency things which I haven't bother to check out yet, but you can switch it to use the old vc9 compiler in the project properties if you encounter problems. They've also moved the "output file" from the linker->output to the general configurations area. Supposedly there's some support for C++0x, but Boost already does a good job of that. Oh yeah, and you can zoom in/out of text (which looks amazing in WPF)!
Advertisement
Lambda expressions can be quite handy for delegate coding in C# and VB. Not sure if maybe it was something added to VC++ 2010 and that is why it was mentioned, because it has been available for C# and VB since at least 2008 if not 2005.
One should really expect refactoring to be an integrated IDE functionality TBH. The way VA colors text isn't overly complex - it simply allows you to assign different colors for a couple of more things and it's odd how that makes all the difference. Sounds like it's becoming largely obsolete, though.

Zahlman - a rabbit of the hat is not that easy anymore.
Quote: Original post by _fastcall
Supposedly there's some support for C++0x, but Boost already does a good job of that.
The Visual C++ Team Blog talks about the new C++0x features supported, including lambdas, auto, static_assert, rvalue references, and decltype.

Quote: Original post by jackolantern1
Not sure if maybe it was something added to VC++ 2010 and that is why it was mentioned, because it has been available for C# and VB since at least 2008 if not 2005.
It didn't exist in the C++ language standard. It technically still doesn't since C++0x hasn't been finalized.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

Quote: Original post by irreversible
Autos are fine if you're not familiar with the code

I have no idea why you think it's necessary to not be familiar with the code for auto to be useful. It's very handy anytime you're writing iterator based code.

Lambdas will be huge in conjunction with <algorithm>. for_each will finally be useful. Typically you only want to do one or two operations and the requirement that they be in a different function (or worse yet, a functor) means that people don't use them. With lambdas you can just put everything in-line in a very readable way.

Is anybody else annoyed that static_assert requires an assert message? I predict that roughly 90% of all assert messages will be "assert failed" or some other extremely useful variant. Automatically using the stringized expression as the assert message like most sane assert implementations do may not be terribly informative to the end user, but the end user shouldn't be seeing them anyway. And for static asserts it's actually impossible for the end user to see them.
-Mike

This topic is closed to new replies.

Advertisement