Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - May 09 2004 : 10:21:25 PM
|
Yeah, trying to use straight c in c++ would be like writing a console app in VB. Its possible, but you might as well use VB's newer features.
|
|
|
Sion
Warrior
Denmark
138 Posts |
Posted - Jul 09 2004 : 2:44:03 PM
|
C++ is probably going to die out sometime - but not any time soon. It's still a very powerful, fast and platform langauge. Almost all professional games and larger applications are made in C/C++. I'm currently in the process of learning C++. Don't get me wrong - I love Visual Basic - but many books, tutorials, source code examples are all made in C++ and being able to use C++ opens up completely new possibilies when talking game programming. It's always good to have as many different languages in your CV as possible and C++ (along with Java and .NET) are some of the very valuable to have when seaching for jobs or requesting a raise :) And when you've learned your 2-3 programming languages when learning addition languages get very easier. |
Visit my personal blog at www.AndersNissen.com! |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jul 09 2004 : 3:17:37 PM
|
C++ won't die for a VERY long ime. Since it is the standard for many different applications, It won't just magically dissapear one day. Think about it, the US government is still using nasty COBOL to run some of their systems. It will take decades to fully switch all the C++ code into another language.
Also, how would newer languages/compilers be written? They could be written by an older version of themselves (like the .NET for linux : Mono). but from what I hear, this can create new problems. Also, there are many times where things are physically impossible to do with higher level languages where a low(er) level language must be used. That is why assembly still exists today.
Conclusion: C++ will never completely die out, however, it will probably not be the standard gaming languages in 10 years. C++ will take a role similar to Assembly today, that is, use in very performance critical areas, like many VB programmers are doing today. |
|
|
Peter
Administrator
Canada
67 Posts |
Posted - Jul 09 2004 : 3:52:54 PM
|
A lot of these comments you guys make are valid only if you've never really used either C or C++ (ie: its stuff that you;ve either heard or is a very superficial impression).
Basically, C++ is so much faster than VB that it is a no contest. I used to make arguments and debate all the time that VB will catch up or if you write code really well in VB it will get slow, but the bottom line is C/C++ is simply faster. Put simply, sloppy code in C/C++ is usually faster than the most optimized code in VB, and if you are capable of writing excellent code in VB, you can write excellent code in C.
VB is very good at RAD, which is great for applications and dont get me wrong, I love the language, its really pleasent to program in Visual Basic.
But if you think that writing game code (using either DirectX or OpenGL) will take less time because vb is RAD then in C++ you are mistaken because by using DirectX you are in fact not using any of the RAD features of VB. I dont know if that makes sense.
So no, I dont think .Net will ever be a replacement for C/C++. A language will probably replace it but it won't be microsoft's bloatware. |
Talos Studios - VoodooVB - VB Gamer
|
|
|
sdw
Warrior
USA
160 Posts |
Posted - Jul 09 2004 : 4:02:47 PM
|
quote: C++ will take a role similar to Assembly today, that is, use in very performance critical areas, like many VB programmers are doing today.
If you think about it, the only reason Assembly is not used for entire applications is because it's too difficult to do for most programmers. However most programmers *are* able to use C++ to make entire applications, so I don't completely agree that C++ will take on the role which Assembly has today. |
|
|
sdw
Warrior
USA
160 Posts |
Posted - Jul 09 2004 : 4:39:39 PM
|
quote: But if you think that writing game code (using either DirectX or OpenGL) will take less time because vb is RAD then in C++ you are mistaken because by using DirectX you are in fact not using any of the RAD features of VB. I dont know if that makes sense.
Of course you're still using the RAD features of VB. Just because VB has a GUI builder does not make it a RAD alone, in my opinion, though it is a major part. The entire VB IDE pampers its programmers with the good debug system and easy memory management. I have a hard time going to C++ after using VB because I'm so used to how nice VB is to me.
Also when comparing VB with C++, it seems nobody ever brings up the fact that C++ is portable, VB is not. I guess this is because most people use DirectX with C++ anyways.
|
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jul 09 2004 : 4:47:23 PM
|
Well, also consider that assembly used to be perfectly capable of creating entire apps back in the day. However, as software became more and more complex, assembly was less and less desirable to be used for the entire app. That is the reason higher level languages like C, COBOL, and BASIC came about, was to simplify programming. I am predcting something similar in the next couple of decades or so with C++. The software will become MUCH more complex, to the point where it is all but impossible to write a full application in C++.
Another point is that in future versions of windows (longhorn an blackcomb), managed code is going to become much more common than unmanaged. It will still be possible to write Win32, but it will not be a good idea. For one, managed code (JIT bytecode) is faster than the pure binary executables unmanaged code produces (read: should be once it is perfected in future versions of .NET). Also, it will be much easier to develop in managed code due the vast amount of libraries that it includes.
Another point is that .NET code is truely multi-platform. While C++ is "sorta" multiplatform (the code must be changed significantly and recompiled for each platform), a .NET application can be shipped the same to every platform (obviously without the windows namespaces) without any changes to the code or recompiling, as long as the platform has a version of the .NET framework. Thge problem with this is, it will be up to independant developers to write the framework for the different platforms (obviously M$ won't unless it is court ordered...). The only one I know of that has come out so far is Mono for Linux. It seems very good and stable as well.
Sorry for the long post, got a little excited... Anyway, I hope all this makes sense. Also, I am not saying that C++ is useless, quite the contrary, I just want to point out that At some point (read: MANY years from now) it will be obsolete for game develoment. |
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - Jul 09 2004 : 7:30:13 PM
|
There are a couple of things in this post that I don't agree with.
quote: Originally posted by Sr. Guapo
For one, managed code (JIT bytecode) is faster than the pure binary executables unmanaged code produces
Compilers can perform certain optimizations, but all of those optimizations had to be designed by a real person. Any optimizations that are done are based on a static list of optimizations. If a program needs certain parts of it to be written in optimized assmebly, then it is probably entire algorithm that needs to be optimized, and those can not be recognized by a simple pre-made list. If something needs to be optimized, then no computer program can do the job as good as someone that actually knows proper asembly optimization techniques. Most of the time you have to be able to make optimizations that require extremly large code modifications.
quote: Originally posted by Sr. Guapo
Another point is that .NET code is truely multi-platform. While C++ is "sorta" multiplatform
That is simply wrong. .NET is no where near as multi-platform as C++. Cases in point, Mozilla and Maya. And do you really think it is possible to write a large program in a .NET environment without inadvertently using some sort of Windows only function? Be realistic about it. Small programs are trivial to convert, but it is the extremly large applications that need to have a minimized cost when converting them to run on a different platform. Do you think using Managed DirectX makes your program portable? If you want a true multiplatform development environment, then I suggest JAVA. You can compile once and never have to recompile for the many different computer enviroments that have a JAVA runtime.
Microsoft makes good products, but there is a point where you have to realize that some of the stuff they say is just for marketing purposes because the people in major companies (which are Microsoft's largest customers) that actually buy the software are generally not the people that have to use it. That may not make much sense, but that's reality. |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - Jul 10 2004 : 12:16:58 AM
|
Regarding your first comment: From what I have heard (though it may be wrong) a managed app has the ability to run faster than an unmanaged, regardless of optimizations. Obviously this hasn't happenned yet, but many are saying (including M$ I believe) it will become a reality in the next releases of windows.
To your second comment: I suggest you head over to the Mono site . Make sure you check out their faq as well. Specifically read the questions about GUI apps (#26 - 37, particularly the last part of #26). Very interesting: you may also want to check out the "Wine" project (or something). It seems to be involved with making the windows librarie accessible through mono, though I only took a quick glance...
[EDIT: fixed link] |
Edited by - Sr. Guapo on Jul 10 2004 12:19:19 AM |
|
|
|
|