Sign in to follow this  
Cacks

VC++ 2005 vs 2008 / 2010

Recommended Posts

Cacks    179
Hi guys, Haven't been doing much C++ programming for a while, been working with Eclipse mainly. Gona get back into writing some games. I have VC++ 2005 standard but compared with Eclipse its crap. Its too slow to write ANSI C++; the intellisense is rubbish, there are no refactoring options, doesn't show errors where they occur in the code etc. I'm wondering if newer versions of Visual C++ are any better? I know VS 2010 isn't out till March, but would it be worth upgrading? Or will it be just as slow to develop with? cheers

Share this post


Link to post
Share on other sites
jpetrie    13137
Quote:

Its too slow to write ANSI C++;

Um, what?

Quote:

the intellisense is rubbish, there are no refactoring options,

VS has always had bad intellisense, unfortunately. VS 2010 improves it to a degree. There are also add-ins, like VAX, that can help.

Quote:

doesn't show errors where they occur in the code etc.

Yes it does. It just doesn't do it as-you-type until 2010.

Quote:

I'm wondering if newer versions of Visual C++ are any better?

Yes.

Quote:

Or will it be just as slow to develop with?

I still don't know what you mean by "slow to develop" with, I suspect it's either because your machine isn't powerful enough to run it well (it does consume a lot of resources) -- in which case VS 2010 will probably be worse for you -- or you just don't know how to use it effectively, coming from Eclipse which operates differently. Your problem descriptions are too vague.

Share this post


Link to post
Share on other sites
Cacks    179
Hi jpetrie,

developing in C++ is slow compared with other languages such as Java. Developing a class in C++ requires more development time than in other languages like Java. The only reason its used in Games is because it gives you direct access to graphics & audio apis.

I'd like it if VC++ would automate more of the tedious tasks such as refactoring and allow me to develop quicker by giving me good intellisense with well document code. VC++ 2005 doesn't help me much here. The more code creation/manipulation an IDE does then the quicker I can develop,

cheers

Share this post


Link to post
Share on other sites
iMalc    2466
Quote:
Original post by Cacks
developing in C++ is slow compared with other languages such as Java. Developing a class in C++ requires more development time than in other languages like Java. The only reason its used in Games is because it gives you direct access to graphics & audio apis.
Don't make such claims as if they were fact. Java is faster for some people, yourself included obviously. I on the other hand can develop C++ code much faster than I could write Java code.

Calling the more recent version of Visual Studio "crap" is not going to get you far either. It's an extremely popular choice nowdays so a lot of people seem to disagree with you. I am quite happy with VS2008 thus far.

Share this post


Link to post
Share on other sites
jpetrie    13137
Quote:

developing in C++ is slow compared with other languages such as Java. Developing a class in C++ requires more development time than in other languages like Java.

This, however, isn't what you implied. You implied that developing C++ with Visual Studio was slow, not that developing in C++ itself was slow, period. It is the latter assertion that made little sense to me.

C++ is a relatively low-level language, in terms of abstraction, and such languages are generally less "efficient" (for some definition) in terms of development time than higher level languages. But again, that isn't what your post read like at all.

Quote:

The only reason its used in Games is because it gives you direct access to graphics & audio apis.

This statement is incorrect on a number of levels; C++ is used outside of games often enough, although other languages certainly are as well. C++ is still used primarily by commercial PC/console game developers for a number of reasons, but "direct access to graphics and audio APIs" isn't really the crux of the issue. Besides, APIs can be developed that are just as "direct" (which is a relatively meaningless term) for other languages.

Quote:

I'd like it if VC++ would automate more of the tedious tasks such as refactoring and allow me to develop quicker by giving me good intellisense with well document code. VC++ 2005 doesn't help me much here. The more code creation/manipulation an IDE does then the quicker I can develop,

Well, it doesn't do that. The situation improves incrementally as new versions of VS are released, but the fact remains that C++ is a complex and difficult-to-parse language (especially for the highly interactive rates required to implement most useful intellisense-type features) and tools don't do a very good job of it. Even Visual Assist breaks down under very complex C++, although it is certainly far and away superior to the built-in intellisense systems in the currently released Visual Studio SKUs.

Share this post


Link to post
Share on other sites
_the_phantom_    11250
Quote:
Original post by jpetrie
Quote:

doesn't show errors where they occur in the code etc.

Yes it does. It just doesn't do it as-you-type until 2010.


First time I saw this in VS2010 it made me so happy; normally I type, bash F7 and fix the errors the compiler finds; now the background stuff finds it for me and I can correct in advance.

VS2010 = <3
VS2010 + VAX = <3 <3 <3 [grin]

Share this post


Link to post
Share on other sites
cache_hit    614
Quote:
Original post by Sneftel
Once again there's not much there for the C++ programmer.


You're not serious right? Visual Studio 2010 has

1) C++0x support for lambdas, decltype, auto, r-value references
2) Concurrency Runtime providing, quite frankly a fairly awesome task-level parallelism library akin to TBB, right out of the box.
3) Vastly improved Intellisense support, probably better than Visual Assist
4) Phenomenal parallel debugging improvements and concurrency visualization tools
5) Many other minor usability enhancements.

MSVC 10 is going to be made of pure win IMO.

Share this post


Link to post
Share on other sites
Cacks    179
Hi iMalc,

Quote:
Don't make such claims as if they were fact

C++ would requires that I write more code to create a class than in Java or C# therefore it is slower to develop in.

Quote:
Calling the more recent version of Visual Studio "crap" is not going to get you far either. It's an extremely popular choice nowdays so a lot of people seem to disagree with you

I didn't call the more recent version of visual studio crap. I said that VC++ 2005 is crap. In my option compared with Eclipse & Netbeans for Java it is. No one with any sense would develop in C++ if they could avoid it. Just because people buy it doesn't mean its good. Their best bet for writing games for Windows is VC++. I don't know any other business apart from graphics orientated ones where C++ would be used. Maybe only systems with C++ legacy systems.



hi jpetrie,

[quote]C++ is used outside of games often enough[/uote]
I said for games.

Quote:
other languages certainly are as well

Can you name me big commercial Windows games which don't use VC++ as their main language? No Flash games.

Quote:
C++ is still used primarily by commercial PC/console game developers for a number of reasons

Name the other reasons? I bet there aren't that many.
- Console developers have to write their games in C++, what else are they going to use?
- PC developers hardly use VC++ because of its threading, networking, I/O, garbage collection etc abilities. If I wasn't interested in writing code that I can port to other systems I'd probably investigate using C#.

Quote:
APIs can be developed that are just as direct for other languages

If you want access to Hardware APIs using other languages, you're going to need wrap C++ code in that language e.g. Java OpenGL.

Quote:
the fact remains that C++ is a complex and difficult-to-parse language

I agree, its bloated, overly complicated, its slow to develop with.


I would assume you both are solely VC++ developers. I have noticed that people who use particular technologies won't accept they have faults. I worked with a javascript programmer who argued with me that javascript is the most import language at the minute. What was he talking about! Its a complete crap heap for many reasons.


Bottom line - C++ is slow to produce anything with, VC++ doesn't do much to alleviate the situation.


hi phantom,

yeah it is annoying in VC++ 2005, having to compile every 2 minutes & trying to work out where the error is. It eats up a lot of time.

Share this post


Link to post
Share on other sites
frob    44968
Quote:
Original post by Promit
I've been testing a VS add-in called Refactor! for C++ lately. Not much to report yet, but it does seem to handle basic tasks at least.

I use Refactor! Pro, plus Visual Assist.

They have a little overlap that needs to be coordinated, such as turning of some syntax hilighting and intellisense stuff in Refactor! and turning off some autocomplete values in VAX.

Combined there are a lot of awesome little things. There are great keyboard shortcuts, copy/paste automatic expansions, droppable markers, auto-expansion for switch statements to cover all types, and more.

Individually they are both good. Together they are like Peanut Butter and Chocolate, bringing joy to millions.

Share this post


Link to post
Share on other sites
NickGravelyn    855
Well it sounds like you don't like C++. I'd recommend a different language. C# is a rather nice language that has lots of the IDE feature support you want and is quite capable of game development. Take a look at XNA or SlimDX for some options around that.

Share this post


Link to post
Share on other sites
Mike.Popoloski    3258
Just for the record: Visual Studio is not a language. Visual C++ is not a language. Eclipse and Netbeans are not languages. You should stop referring to them as such, especially in the case of Visual Studio which has support for numerous languages, including C# and Visual Basic.

Share this post


Link to post
Share on other sites
Antheus    2409
Quote:
- PC developers hardly use VC++ because of its threading, networking, I/O, garbage collection etc abilities.


You've got everything mixed up.

VC++ *is not* a language. VC++ doesn't exist. There is Microsoft Visual Studio, which is an IDE centric collection of development tools. It comes with C#, C, C++ and several more compilers along with .Net framework. There is no such thing as VC++.

Visual Studio has nothing to do with threading, networking, I/O or garbage collection.

Quote:
If you want access to Hardware APIs using other languages, you're going to need wrap C++ code in that language e.g. Java OpenGL.

No. OpenGL is C.

Java contains OpenGL bindings, which use JNI (a C API) to expose that functionality to JVM.

And it is not possible to access hardware APIs through C++ either, at least not on most OSes. Under Windows, it is accessed via HAL, which represents several layers of abstractions, commonly exposed via either OpenGL or DirectX libraries.

WinAPI is also C-based due to its legacy. There are several C++-like wrappers on top of it, but it is usable exclusively via C interface.

Quote:
I would assume you both are solely VC++ developers. I have noticed that people who use particular technologies won't accept that their they faults. I worked with a javascript programmer who argued with me that javascript is the most import language at the minute. What was he talking about! Its a complete crap heap for many reasons.

I would be careful of judging others while using "VC++" to back your claims. There is also no ANSI C++.

The opinions expressed here are those of ctrl-space coder. Type and type until it builds, then hack until it eventually resembles something via sheer trial and error.

This type of style doesn't work with most beyond Java. It doesn't work in Java either, it's just more tolerant of that.

Share this post


Link to post
Share on other sites
jpetrie    13137
Quote:

C++ would requires that I write more code to create a class than in Java or C# therefore it is slower to develop in.

That isn't a universal truth, though. While it's true that often C++ involves more developer time, there are a number of factors involved. The verbosity of the source code is a superficial metric in comparison to those other factors (breadth of the standard library, the types and depth of features available in the language, the paradigms the language is designed to admit, et cetera).

Quote:

No one with any sense would develop in C++ if they could avoid it.

That's your opinion as well. Try not to conflate opinion and fact. One could make an equally inflammatory assertion about Java.

Quote:

I don't know any other business apart from graphics orientated ones where C++ would be used. Maybe only systems with C++ legacy systems.

There are plenty. Medical and military simulations (even the aspects not dealing directly with graphics) for example. Databases. Business software (to an extent). Lots of applications you probably use on a daily basis (paint programs, word processors, et cetera) are completely or partially written using C++. Your view of the domain seems rather narrow.

Quote:

<quote>C++ is used outside of games often enough</quote>
I said for games.
<quote>other languages certainly are as well</quote>
Can you name me big commercial Windows games which don't use VC++ as their main language? No Flash games.

I know you said for games, that's why that point was ancillary. But I'm not going to answer your question if you're going to place arbitrary restrictions on it; clearly you've just provided at least one answer for yourself.

Quote:

Name the other reasons? I bet there aren't that many.
- Console developers have to write their games in C++, what else are they going to use?
- PC developers hardly use VC++ because of its threading, networking, I/O, garbage collection etc abilities. If I wasn't interested in writing code that I can port to other systems I'd probably investigate using C#.

Console developers don't have to write their games in C++. They typically choose to, because that's the toolchain provided to them by the vendors. But they don't have to. One of the Crash Bandicoot games was written, for example, in Scheme (or Lisp or something similar).

PC developers use VC++ quite often in fact, especially those only developing for the PC. VC++ is the IDE, however, which itself has no features related to threading, networking, I/O or garbage collection. I think you meant C++, in which case you're still incorrect except with respect to file IO. C++ (the current standard) has no concept of a "thread" or "network" or anything related, and certainly has nothing resembling garbage collection.

There's a difference between the IDE and language, and you seem to have them mixed up.

Other reasons beyond those you identified that C++ is commonly used include developer knowledge and the large body of existing code and tools that support them in using that language. The benefit of the features offered by other languages and other tools for those other languages tends not to outweigh the disadvantage in cost and time to retrain and port for larger studios that have been around for a while.

Quote:

If you want access to Hardware APIs using other languages, you're going to need wrap C++ code in that language e.g. Java OpenGL.

Not necessarily. It depends on the API, though. Note that when you do need to do such wrapping, as with OpenGL, you generally use C since C++ has no standard ABI.

Quote:

I agree, its bloated, overly complicated, its slow to develop with.

I somewhat disagree with "bloated," but certainly agree on "overcomplicated." The last point is again, too broad to be a comfortable generalization.

Quote:

I would assume you both are solely VC++ developers. I have noticed that people who use particular technologies won't accept that their they faults. I worked with a javascript programmer who argued with me that javascript is the most import language at the minute. What was he talking about! Its a complete crap heap for many reasons.

You would assume incorrectly. I can't speak for whoever else you were referring to, but I use plenty of other languages (C#, Python, Lua, C++/CLI) in addition to C++ and in fact I almost never do any C++ development any longer.

I think you're demonstrating the very same narrow-minded hubris you're accusing others of having, and it's getting in the way of viable discussion. So please, leave your ego at the door.

Quote:

Bottom line - C++ is slow to produce anything with, VC++ doesn't do much to alleviate the situation.

Absolutes are rarely reasonable.

Share this post


Link to post
Share on other sites
Cacks    179
Hey NickGravelyn,

I don't think its great, I don't dislike it though. I was trying to find out if more recent versions of VC++ provided more features to develop with.


Hi Mike.Popoloski,

I don't think I refered to Visual Studio as a language, its obvious that its not. I know that it contains several languages, I used to work for Micosoft. How would you like me to describe VC++. Would Win32 C++ suffice?

Share this post


Link to post
Share on other sites
cache_hit    614
Quote:
Original post by Cacks
Hi iMalc,

Quote:
Don't make such claims as if they were fact

C++ would requires that I write more code to create a class than in Java or C# therefore it is slower to develop in.


Are you sure? Write a class in both Java and C++ with the following simple requirement:

1) A method called find() which takes as input a string, which represents some key. If the key is found in an internal map, the function should return true as well as the value. If the key is not found, the function returns false. here's the code in C++


class foo
{
std::map<std::string,int> map_;
public:
bool find(const std::string& key, int& output)
{
std::map<std::string,int>::iterator it = map_.find(key);
if (it == map_.end()) return false;
else { output = it->second; return true; }
}
};




Write that same class in Java with less code.

The fact that you often end up writing more code in Java than in C++ just shows that perhaps you don't aren't as familiar as you could be with all of the C++ libraries available to you. The only reason people often "write less code" with Java is because the standard library does lots of stuff for you.

Even still, the fact that using it makes you want to beat your head into a wall at times means that for some people, it's far less productive than C++. I can even debug native code faster than I can debug Java, just because of the power of the tools available.


Here's one reason why I hate Java: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

There's plenty of others though. The fact that you can't return multiple values (i.e. by reference/pointer in C++, using ref or out keyword in C#, etc) is absolutely infuriating. Lack of unsigned types is just as infuriating. Not trying to turn this into a language flame war, but just because you're more productive in Java doesn't mean everyone else. Plenty of people are highly proficient in C++ and can get the job done in equal or less time as you can in Java.

Share this post


Link to post
Share on other sites
Washu    7829
Quote:
Original post by Mike Popoloski
Mike Popoloski | Journal | SlimDX

Quote:
Original post by Promit
SlimDX | SlimTune

Quote:
Original post by jpetrie
Josh Petrie | Scientific Ninja | Twitter | SlimDX: October is the new August.

Quote:
Original post by Washu
In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.
ScapeCode - Blog | SlimDX


Hmmm, SlimDX... Wonder what that is... [grin]

Also, I'm going to call you out on the Microsoft front. You may have possibly worked for them a long time ago, I doubt it though, but your knowledge is way out of date if you think Visual Studio is written in Win32 C++ (whatever that is, and even 2003 had managed components in it).

Share this post


Link to post
Share on other sites
jpetrie    13137
Quote:

I don't think I refered to Visual Studio as a language, its obvious that its not. I know that it contains several languages, I used to work for Micosoft. How would you like me to describe VC++. Would Win32 C++ suffice?

You did, on a number of occasions. C++ is "C++" and nothing else.

"VC++" is typically understood to mean "Visual C++" which is typically understood to be shorthand for the Microsoft product "Visual C++ Express" which was what some versions of the Visual Studio Express Edition SKU were called. Long story short, VC++ refers to the IDE, not the language.

"Win32 C++" is even worse, because it's meaningless. "Win32" is typically understood to mean the "Win32 API," the C API used to interact with the operating system on modern Windows installations. C++ has nothing to do with that.

Share this post


Link to post
Share on other sites
cache_hit    614
Quote:
Original post by Washu

Also, I'm going to call you out on the Microsoft front. You may have possibly worked for them a long time ago, I doubt it though, but your knowledge is way out of date if you think Visual Studio is written in Win32 C++ (even 2003 had managed components in it).



I think maybe he's just failing to distinguish between the core compiler and everything else.

Share this post


Link to post
Share on other sites
Antheus    2409
Quote:
Original post by Cacks
I don't think I refered to Visual Studio as a language, its obvious that its not. I know that it contains several languages, I used to work for Micosoft. How would you like me to describe VC++. Would Win32 C++ suffice?


If you want to write C++ code, you write C++.
If you want an IDE, you choose Eclipse CDT (there actually is Eclipse for C and C++), VS, Code:Blocks, Notepad++, emacs, ....

C++ is language standardized by committee. Different compilers offer different degrees of standard compliance, something which must be taken into account depending on platform.
Both C++ compilers inclided by GCC4 and MVS2005 and later versions can be considered to offer adequate adherence to standard to be considered standard C++.
Microsoft offers glue extensions for C++ and .Net interoperability commonly referred to as Managed C++, but that is Microsoft specific language and should is not C++ as such.
Microsoft's compiler, just like GCC, or any other compiler for that matter, comes with proprietary standard library and vendor-specific compiler extensions.

Win32 refers to specific subset of Windows Platform API. There is no Win32 C++ and Win32 is used to signify the difference that occurred during transition from Win16 around the Windows 3.0 era.

Share this post


Link to post
Share on other sites
Nitage    1107
Refactor! is nice - the one issue I've found was that it hangs the IDE when I load a paticular project that includes a JSON parser written using Boost Spirit. But I find the addon useful enough to justify splitting the JSON parser into a seperate static library project. It's irritating that I have to disable addons before loading that project but, as it's written against a very small and static spec, it very rarely changes.

I haven't tried VAX with 2008 yet.

Share this post


Link to post
Share on other sites
cache_hit    614
Quote:
Original post by Cacks

Can you name me big commercial Windows games which don't use VC++ as their main language? No Flash games.



Of course nobody can name commercial games that don't use VC++. Nobody can name commercial games that do use VC++ either, unless they actually worked on that game. Companies don't go around publicizing which compilers they use for their games.

I would be highly surprised if a number of games haven't used Intel C++ for their games, since it is well-known to produce the most highly optimized code of any other compiler.

Share this post


Link to post
Share on other sites
Antheus    2409
Quote:
Original post by cache_hit

I think maybe he's just failing to distinguish between the core compiler and everything else.


Are there any C++ compilers which have core and something else. They usually come as compiler and linker pairs, with pre-processor being part of compiler.

Microsoft's versions are cl.exe and link.exe. Everything else is either IDE, .Net, platform libraries and runtimes, various tools, documentation, ....

Share this post


Link to post
Share on other sites
Buckeye    10747
For what it's worth, I just moved from 2005 to 2008. The Intellisense is (my opinion, not an absolute) greatly improved, particularly with respect to structures, classes, arrays, etc. (On my own machine) it updates quickly, recognizing new classes, structures, etc., within a second or so of adding a new "#include" to a file.

During debugging, it's even more valuable and includes the ability to inspect values in individual elements of an array of classes containing vectors... with just a mouseover of the variable.

That alone made it worth while for my own particular style and set of individual-and-perhaps-not-universal preferences.

(Hope I provided enough qualifications)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this