Is it needed to learn C++?
VBBRIs it really needed to learn C++? I mean, for me to be a proffesional programmer. I started thinking that taking a close look at the direction Windows (and IT in general) are taking, C++ will be dead soon. If it doesn't, still look at Windows. The next versions will be "heavily integrated with .NET" (Eric Coleman). So it doesn't matter if you use C#, VB.NET, J# or managed C++. All will be the same thing in the end. C++ seems to me somewhat wrong for the current direction of IT. I think the .NET approach (unhappily it was M$') is more likely to succeed. Well the main reason I started this topic for is the question: Is it really needed for me to learn a language that probably won't last for long? Remember, C++ is somewhat old and has its problems... A little off-topic but just a little question: is it better for me to make HEX in VB6 or 2003? Does everyone here have the .NET framework 1.1?
EACamC++ old? Sure, that's why it's supposedly so great. But you're right, it does seem it'll die off soon, considering the easier languages are getting more and more powerful...but it'll never COMPLETELY die. There'll always be the good old timers who keep it alive. Professional programming with VB? Sure! I know a guy who does programming in almost solely VB as his job (aka Profession :)! Although, you must realize that alot of the programming jobs are going off to third-world contries: India, for example. With the build up in the internet, passing info between contries is a breeze, and paying indians who live on rice and potatos is a whole lot cheaper than giving health insurance benefits to an American dude who's a member of a nasty union anyway. So if you really want a good programming job, learn some indian language and get on over to india. So you may be living in a shack, but at least you have a job! (unlike if you were in America, tho you'd probably be better off on wellfare without a job anyway ;) just my 2-cents.
VBBRYeah I also do a (small) job using VB and just VB. But still it's a job and remember I am relatively new with programming... Just because sometimes you may need the low-level access of C++ and it's good to know the "main" language of the industry. But as .NET comes in, I really don't know if C++ will continue being the "lead" language. (BTW I once saw a post on GDNet complaining that VB is worse than C++ just because it has a bunch of keywords... heck that's what makes VB so easy...)
sdwC++ won't die. If you want to become a professional programmer then you'll want to learn C/C++ because it's very popular, fast, and used in most professional games today. Doesn't .Net need a virtual machine like java in order to run, therefore making it much slower than C++? Not real sure I don't use .net
EACam.NET has not been proven to be much slower (if any) than traditional least as far as I know. So they present mainly benefits, not problems. (But I'm still a VB 5.0 old timer [:)], i like 6.0 a lot better, but I wouldn't use .NET if you paid me........well......maybe)
sdwAlso, isn't .Net limited to windows only?
VBBRHum, M$ says that ".NET programs will be running in any OS that has the .NET framework without any need of change in code". But of course as long as M$ continues developing Windows this means Windows only. (well, vb6 is also just win isn't it?) Never hope for a .NET framework in Linux... ...that is, unless someone creates an un-official one!
Lachlan87I know of a group that is working on a version of the .Net runtimes for linux (I'll try to post the link later), but as far as I could tell, their version wouldn't support windows forms, so 99% of .Net code wouldn't even run. . . but then, I only glanced over the site. Maybe I was mistaken.
Lachlan87Ok, now for those links: I think this is the one I was thinking of: [url][/url] But Novell is sponsoring another (better, I think) one: [url][/url] Both of these came from this list of linux equivenlents of windows programs: [url][/url] You might be surprised what linux has to offer. I don't pretend that it is a better OS for most of us to use, but I don't think a lot of people realize how far linux has come.
Eric ColemanC++ is the way to go for game programming. Windows is NOT the only gaming platforum. There is Nintendo, Sony, and Microsoft's XBOX, which will be using the same processors used in Apple computers. You not only need to learn C++, but also ANSI C, Assembly, and know a lot of mathematics.
VBBRGood that I like maths. [:D] Thanks for the point Eric, good remembering me that consoles also exist... What is the usefullness of C? I think C++ is the "important" as yourself said...
Dan.NET is OS independant, as long as the target machine has the framework installed. When a .net application is compiled from c# , vb or whatever - it is compiled down in to an intermeditate format - a middle ground - that requires final compilation on the target machine. Although an application can be set to compile during installation it's default operation is to recompile every time it runs, along with the bloat of the .net framework.
VBBRThat's what I said. The problem is that (currently) there isn't a (complete) framework for any OS other than Windows.
Eric ColemanYou can't use the cross platform possibility of .NET as a reason for using it. First, there is no work being done by microsoft on Linux. Also, even if someone does create a .NET for Linux, then it will be so outdated that newer programs won't work on it at all. Look at the current schedule of .NET. Microsoft released .NET 2002, and then it released a newer version in 2003. If you rely on 3rd party companies for .NET support, then you'll end up using a version of .NET that works on windows but not on Linux. With Microsoft's new version of windows, the .NET framework will be upgraded yet once again, and any Linux port of the .NET runtimes will be severely outdated. The other reason you can't expect your .NET game to run on Linux is that you'll probably end up using DirectX, and there is no version of DirectX for Linux. So even if you did create 1.0 .NET game, the fact that it uses directx makes it a Windows only program. In reality, there is no such thing as "cross platform" .NET when it comes to game programming. C++, on the other hand IS cross platform. C++ has compilers for every conceivable operating system, so if you use C++ (Not Visual C++), then you can have some reasonable cross platform code. Look at Mozilla for example, it is written in C++ and is cross platform.
VBBRVery clear. Thanks a lot for all your explaining here. (of course anyone can post more arguments [:D])
Lachlan87Yes, it would be more accurate to say that .Net was intended to be platform independant. Right now you can't even count on a windows machine to have it---which brings me to the point of this post: You asked if you should write HEX in VB6 or VB.NET. Much as I like VB.NET, I would recommend you use VB6. Although more and more people have the .net runtimes, I get the impression that those who do are still in the minority. Of course, if you don't care if only a half dozen people play your game. . .
VBBRYeah I was already making it in VB6, I asked just to know your opinion, thanks...
VBBRHey just came here and noticed a question wasn't answered...
Originally posted by VBBR
What is the usefullness of C? I think C++ is the "important" as yourself said...
EACamWEEELLLL....C is technically faster than C++, but I can't think of any compilers for only C. C doesn't support there's a plus. [;)] (I personally hate's slow and annoying [what's up with this Friend business? Just use a module for goodness sake! [|)]]) C++ was adapted from C and is fully backwards idea if that's of any use. I'm not a C or C++ programmer (i know a little) my words are dirt, really.
Sr. GuapoFrom what I understand, C++ is C, with a couple of extras (like OOP). It makes sense that C is a little faster, but I can't imagine it being enough to worry about.
Eric ColemanANSI C is generally better, in my opinion, for creating helper DLL's for VB. You can easily manage memory through VB, and thus you generally don't have to worry about memory leaks. Also, you can't be a decent C++ programmer if you don't first learn the basics of C programming. Learning C++ without first learning C is like learning to Run before you Walk.
cjb0087C used to be faster than C++ , but since then compilers have gotten alot better at optimising, so there is pretty much no difference. and with classes in c++ they are pratically the same a structs(types) except with some added features, so no speed difference(that i know of)
Originally posted by Eric Coleman
Also, you can't be a decent C++ programmer if you don't first learn the basics of C programming.
Sorry but could you explain why? I have found C++ really easier than C... Comparing, isn't it like VB is to BASIC as well as C++ is to C ? So is it needed to learnd BASIC before VB? (little side note: not to admit anything, but I think learning BASIC helped me a little with VB. [:)] )
Also, you can't be a decent C++ programmer if you don't first learn the basics of C programming. Learning C++ without first learning C is like learning to Run before you Walk.
I don't agree with that. I learned a lot of C++ without looking at C. I always thought they were basically the same syntax except that one's OOP, the other's not. Maybe what you were thinking is that people who are new to programming should start at a higher level language that wouldn't be so hard to follow as C++ would be.
You can easily manage memery through VB, and thus you generally don't have to worry about memeory leaks.
Amen to that. Not to mention whatever you do in C/C++ could be done much faster with VB.
What is the usefullness of C? I think C++ is the "important" as yourself said...
It's still used in some system and network programming. However, C came first therefore it's still around. C++ is more commonly used though.
So is it needed to learnd BASIC before VB?
No. It's not _needed_ to learn any language first before another, it's only recommended.
Eric ColemanC++ is a superset of C, so if you learn C++, then you ARE learning C. BASIC and VB are two totaly different languages, so its not fair to compare them. They might be related, but they're not sets of each other. C is like addition, C++ is like multiplication. If you skip learning how to add and go directly to multiplication, then you are learning how to add, it's just that the learning curve is would be steeper than if you were to learn addition first.
Sr. GuapoI agree with sdw. I learned c++ with no knowledge of c. They are so similar, it would be like learning VB .net before VB 6. The sytax id almost exactly the same. A c program should work on a c++ compiler. It may help to know the basics of C, but is not required.
Eric ColemanI never said it was required, I only said it is more difficult.
VBBROK so I'll stick with learning just C++. I guess it shouldn't be too difficult because I already know a lot of VB and the general programming principles are always the same. Also I'm already learning C++ at [url][/url] and I am not finding it hard. Just pointers that are kinda confuse... like * is the same as p->xxx or something like that... and then there is the fact that arrays and pointers are basically the same thing, and it takes some time for you to absorb that. Anyway I recommend this site for anyone wanting to learn C++, it is very complete. I have tried [url][/url] but [url][/url] is a lot better.
ballistikTaken from Sams; Teach Yourself C++ in 24 Hours:
C++ benefited from its relationship to C for many years, as C programmers could ease into their use of C++. To really get the full benefit of C++ however, many programmers found they had to unlearn much of what they knew and learn a whole new way of conceptualizing and solving programming problems. ... The question inevitable arises: because C++ is a superset of C, should I learn C first? (Bjarn) Stroustrup (creator of C++) and most other C++ programmers agree: not only is it unnecessary to learn C first, it is a bad idea.
Through my experience, I agree with them.
VBBROne argument more for me [:)]
cjb0087yeah learning c first is a bad idea, because you dont use c++'s best featueres as much as you usually would like OOP and streams
Sr. GuapoYeah, 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.
SionC++ 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.
Sr. GuapoC++ 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.
PeterA 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.
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.
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. GuapoWell, 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 ColemanThere are a couple of things in this post that I don't agree with.
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.
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. GuapoRegarding 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 [url=""]Mono site[/url] . 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]