Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Learning C++
123
Learning C++
2007-06-02, 12:45 AM #1
I'm looking into learning C++ and thought I'd ask here for information on what way would be easiest and most beneficial to learn. Where I can find some online lessons and what books might be a good buy for teaching C++?
I do have a very basic understanding of it and by following some tutorials I've been able to compile a few programs and build on the tutorials a bit, but that's the extent of my understanding.

I learned javascript fairly quickly awhile ago once I sat down and read up on it and from what I understand, C++ isn't much more difficult to learn than javascript. Right?

Any advice?
2007-06-02, 4:47 AM #2
Quote:
C++ isn't much more difficult to learn than javascript. Right?


Perhaps in the same way a tank isn't much more difficult to drive than your mother's minivan.

Learn C# instead.
Wikissassi sucks.
2007-06-02, 4:49 AM #3
As programming languages go, the only real similarity between Javascript and C/C++/Java is the style of the syntax (curly braces). Very few people actually know how to program in Javascript, most (myself included) will just write in a C/C++/Java style rather than doing it properly.

It's like that old saying about how Fortran coders write Fortran code even when using other languages.

But if you've been writing Javascript in a C++ style, the main things are pointers, double-pointers, class definition files, memory management and lots of other nasty things.
Detty. Professional Expert.
Flickr Twitter
2007-06-02, 5:57 AM #4
The first question you need to ask yourself is why you want to learn C++. What kind of program do you want to write? Are you sure C++ is the ideal choice for your project? Would you learn carpentry by building a house with nothing but a power drill? You need to pick a project first, then choose a tool after you understand what the project requires.

In almost every situation where C or C++ is the historical choice, C# is much better. C# is faster to write, the syntax is cleaner, the .NET Framework is extremely feature-rich and the language has a number of features built in which you will almost always have to implement yourself, in some form or another, for any non-trivial C++ application. C++'s uses are mainly limited to a very few and very specific tasks and, to be quite frank, if you're still asking how much harder C++ is to learn than Javascript then you won't be doing those specific tasks for a very long time.

Beyond that, if you're doing a project where you absolutely need C++, then that project probably isn't the right one for a beginner to do. C++ is a rat's nest schizophrenic multiparadigm hybrid bastardization and I don't suggest learning it at all unless you're writing for an environment that doesn't support managed code. And even then, you might be better off learning D because D is a much better programming language than C++ - it's more like C# with C++ performance, but it's not entirely available yet.
2007-06-02, 5:58 AM #5
Ok, I started looking at pointers and just out of curiosity, under what circumstances would a pointer be needed? Specifically the reference operator (&). Why would the physical location of a value in memory need to be known by anything other than the operating system?

@ Jon`C
I want to work with the Irrlicht 3d engine (http://irrlicht.sourceforge.net/) and that's written in C++. It's in .NET languages too, but I couldn't find the full sources for that or anything on the site about C#, just C++, so I started looking into that. Truth be told, I'm just looking to learn a more advanced and capable language that JavaScript, something that I can actually do something which, and this seemed like a good place to start learning.
2007-06-02, 6:00 AM #6
Originally posted by Stormtrooper:
Ok, I started looking at pointers and just out of curiosity, under what circumstances would a pointer be needed? Specifically the reference operator (&). Why would the physical location of a value in memory need to be known by anything other than the operating system?


The operating system does not manage memory outside of page or segment allocation.
2007-06-02, 6:30 AM #7
Originally posted by Stormtrooper:
@ Jon`C
I want to work with the Irrlicht 3d engine (http://irrlicht.sourceforge.net/) and that's written in C++. It's in .NET languages too, but I couldn't find the full sources for that or anything on the site about C#, just C++, so I started looking into that.
That's because the engine itself is written in C++ - there wouldn't be C# source code. You need to provide the C++ or C# code that will make the game run.

The most important part about learning how to program is developing the 'programmer mentality' - essentially the ability to define the rules for a system to operate under without really defining the system itself, which is fundamentally opposite to the way functional human minds operate.

Game programming is a unique challenge because it takes all of the concepts and abstractions you deal with in ordinary programming, and it stuffs the whole thing in a gigantic 100,000 line finite state machine.

Irrlicht is just a 3D engine. A 3D engine is not a game. If you use Irrlicht you have to write the game yourself. The engine won't do anything unless you tell it what to do. Irrlicht isn't even the most difficult part of game programming, it's simply the most time-consuming. You still need to understand how to write something similar, yourself, in order to use it effectively.

Quote:
Truth be told, I'm just looking to learn a more advanced and capable language that JavaScript, something that I can actually do something which, and this seemed like a good place to start learning.
C++ is not and never has been a good place to start learning how to program for the express reason that it is not a good programming language. It's an effective programming language but it's not a good one.
2007-06-02, 6:55 AM #8
Originally posted by Jon`C:
The most important part about learning how to program is developing the 'programmer mentality' - essentially the ability to define the rules for a system to operate under without really defining the system itself, which is fundamentally opposite to the way functional human minds operate.

Like I said earlier, I've used JavaScript before and have a very basic understanding of programming, so it's not like I'm diving into something that I've never had a trace of experience with.

Originally posted by Jon`C:
Game programming is a unique challenge because it takes all of the concepts and abstractions you deal with in ordinary programming, and it stuffs the whole thing in a gigantic 100,000 line finite state machine.

Which is why I'm looking into learning, so I can build up enough to be able to start into game programming, but game programming isn't the only reason I'm looking to learn a new language. Granted I do want to study to be a game programmer, but I want to start small first.

Originally posted by Jon`C:
Irrlicht is just a 3D engine. A 3D engine is not a game. If you use Irrlicht you have to write the game yourself. The engine won't do anything unless you tell it what to do. Irrlicht isn't even the most difficult part of game programming, it's simply the most time-consuming. You still need to understand how to write something similar, yourself, in order to use it effectively.

I already know that it's just a 3D engine (notice how I said a 3D Engine and not a game engine in my last post?). I've already read up on it and know exactly what it is. I'm hoping to learn enough to be able to eventually use the 3d engine in a game.

So with that being said, C# would be a better language to start learning then?
2007-06-02, 7:23 AM #9
Originally posted by Stormtrooper:
Like I said earlier, I've used JavaScript before and have a very basic understanding of programming, so it's not like I'm diving into something that I've never had a trace of experience with.


I'd argue that Javascript isn't really programming. It's scripting, which is a totally different beast. You might pick up on a few syntax things from Javascript, but the environment in which you program with is so much more strict in actual programming that it can be overwhelming at first.

Javascript doesn't even handle much typing, instead handling variables much like how PHP does.

Quote:
Which is why I'm looking into learning, so I can build up enough to be able to start into game programming, but game programming isn't the only reason I'm looking to learn a new language. Granted I do want to study to be a game programmer, but I want to start small first.
If you really do want to start small, then start with something other than C++. Really.

Quote:
I already know that it's just a 3D engine (notice how I said a 3D Engine and not a game engine in my last post?). I've already read up on it and know exactly what it is. I'm hoping to learn enough to be able to eventually use the 3d engine in a game.

So with that being said, C# would be a better language to start learning then?
Absolutely. After you get a good feel for C#, learning C++ will be far less daunting (Although you might not even want to after learning C# :v: )
2007-06-02, 7:46 AM #10
Originally posted by Stormtrooper:
So with that being said, C# would be a better language to start learning then?
Yes. With C++ you'll spend a lot more time worrying about semantics than you will about the actual program structure. With C#, and a passable background in Javascript, it wouldn't be unreasonable for your first program to be something like a bouncing ball. With C++ you'll spend weeks learning before you can even get a window open on the screen.
2007-06-02, 10:48 AM #11
Originally posted by Cool Matty:
I'd argue that Javascript isn't really programming. It's scripting, which is a totally different beast.

Yeah, JavaScript isn't turing complete, is it?

I agree with Jon`C. C# is the way to go. If you want to try making games, start with something simple like Pong or Breakout, maybe Tetris. After that maybe take a look at the XNA framework and any available free stuff for it.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-02, 11:00 AM #12
XNA is the way of the future.
2007-06-02, 12:05 PM #13
Originally posted by Stormtrooper:
Ok, I started looking at pointers and just out of curiosity, under what circumstances would a pointer be needed?


:rolleyes:
Oh Boy....

Listen, if your heart is set on game programming, I might recommend Python. It's a good solid language (with a somewhat unique syntax, but that's not too important), and most importantly it has a very mature library of modules most of which seem to have top notch documentation. The official Python tutorials are also really good, so that saves you the trouble of having to find and purchase a book. Once you learn the language, you would probably be interested in the PyGame module which will make it pretty easy to go about making simple little games (in 2d of course).

That said, Jon'C is right, you really need to just learn the programming mentality. The very fact that you had to ask "how do I learn a Programming Language" indicates that your not yet thinking the right way. So do yourself a BIG favor, start small, I mean REALLY small. If you've never even written a standalone commandline program then how do you plan on tackling a full game engine?
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2007-06-02, 1:58 PM #14
Quote:
C++ is not and never has been a good place to start learning how to program for the express reason that it is not a good programming language. It's an effective programming language but it's not a good one.
While I agree that C++ is not for beginners (Notice I recommended C# right up front, in the very first reply) the rest of that statement depends on how you define 'good'.

XNA has it's own issues, but it's being constantly improved and is definitely one of the very best choices for a beginner. The promise of deploying XNA games on Xbox Live is very real.
Wikissassi sucks.
2007-06-02, 3:11 PM #15
Originally posted by Isuwen:
While I agree that C++ is not for beginners (Notice I recommended C# right up front, in the very first reply) the rest of that statement depends on how you define 'good'.


Unless your definition of the word 'good' is "what I use most often" (in which case I would agree with you), C++ is not a good programming language.

C++ is messy, it's hackish, it's obsolete. C++ has all of the problems of C (weak type safety, lack of array or buffer bounds checking, library that allows for accidental and annoying security flaws as a feature, inconsistent and poorly followed spec). C++ inherited a number of modern programming concepts but implemented them in such a halfassed way that they're functionally useless - such as its laughable implementation of generics, the addition of member function pointers (with a this pointer type restricted by declaration!) instead of something useful like a delegate. How about RTTI which is just a pale shadow of reflection?

C++ won't even hold the speed crown for very much longer. Manual memory deallocation is very slow compared to the kind of batching you can do with a good gc. Not to mention the fact that C++ is an awful language for multithreading, even with the nonstandard OpenMP extensions. C# is a lot better because event and marshalling primitives are incorporated into the language. Not to mention the possibility of adding automatic multithreading into the CLR.

The internet is packed full of very valid and very specific criticisms for C++. Here's one I found. It seems pretty good. You should read it. I also think you should look into D, and maybe play around with C# a bit more since nobody who's actually used it for a nontrivial project can honestly defend C++ for anything except systems and 3D engine code.
2007-06-02, 3:14 PM #16
Well with anything, if you procrastinate doing something else by learning C++, you will learn pretty fast.
Back again
2007-06-02, 4:25 PM #17
Hey Jon`C, do you know of any IDEs for D? I found a D plugin for Eclipse here and I'm about to try it out.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-02, 4:33 PM #18
Uhuh. So it has it's failings (I am not agreeing with your arguments, I'm just not going down that branch of the debate). And yet, it's still a good language. You even gave examples yourself where it is the best choice.
Wikissassi sucks.
2007-06-02, 5:09 PM #19
Originally posted by Emon:
Hey Jon`C, do you know of any IDEs for D? I found a D plugin for Eclipse here and I'm about to try it out.


Not really. D is still really young (the spec was only finalized in February) so I don't really think there's anything about there that's especially miraculous. I'm hoping that Microsoft will make Visual D at some point but that might be a pipe dream, considering how similar D and C# are.


Originally posted by Isuwen:
Uhuh. So it has it's failings (I am not agreeing with your arguments, I'm just not going down that branch of the debate). And yet, it's still a good language. You even gave examples yourself where it is the best choice.
Don't try to tell me what I said. I offered a qualifier to my statement that C++ is the best choice in those specific situations.

"C++ is a good language for reasons I will not specify" is the essence of all arguments that are used to defend C++. It is not a good programming language. You cannot disagree with what I said because everything I described is an obvious design flaw in C and/or C++ which has been corrected in every other programming language. Get some real experience with languages like C#, Python or Haskell. Not a lip service suggestion on an internet forum - actually crack open Visual C# and write a real program. C++ doesn't do OOP well, it doesn't do procedural well, it doesn't do functional well. The saving grace of C++ is the fact that you can do anything in it you can do in any other language, but that never saved Perl from being a syntactic cesspool either.

By the way - C# isn't meant for beginners. It's meant for C++ application programmers who are sick of dealing with a language designed to fit the limitations of a PDP-7. C# doesn't make anything easier. C# makes implementation take a third as much time. C# moves incredibly common points of failure (and the accompanying redundant error checking code) into the runtime. The .NET Framework does not supersede Visual Basic 6, it replaces the Win32 API.
2007-06-02, 5:16 PM #20
Originally posted by Jon`C:
C# doesn't make anything easier.

Yes it does, you just have a very strange definition of "easier." :colbert:
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-02, 5:23 PM #21
Originally posted by Emon:
Yes it does, you just have a very strange definition of "easier." :colbert:


I don't consider repetitive error testing or reimplementing known patterns to compensate for a language's wanting feature set to be especially difficult.

I guess it makes it easier in the sense that you're not ****ed if you forget. C#'s not that forgiving either, but at least a C# program will crash itself if you make a mistake. C++ might not.
2007-06-02, 5:56 PM #22
Jon'C, the crux of my argument is that your metrics of 'goodness' are subjective. They don't mean anything.

And, I have used C#. I've done a lot of lisp too.
Wikissassi sucks.
2007-06-02, 7:20 PM #23
I would still suggest C++ because you do your own management of memory which saves a lot of speed compared to the garbage collecting of C#. If you want to write really fast programs for games or real time apps then I would go for c++ over c#, if you want to build something large scale where speed does not matter as much C# would be much better.
"The only crime I'm guilty of is love [of china]"
- Ruthven
me clan me mod
2007-06-02, 8:01 PM #24
Originally posted by tinny:
I would still suggest C++ because you do your own management of memory which saves a lot of speed compared to the garbage collecting of C#. If you want to write really fast programs for games or real time apps then I would go for c++ over c#, if you want to build something large scale where speed does not matter as much C# would be much better.


read thread please


Garbage collection algorithms are faster at the expense of memory efficiency. The performance gain from perpetual defragmentation and batching memory operations greatly exceeds the performance penalty from conducting the garbage collection sweeps. The only way to get similar performance in C++ is to intelligently utilize a pattern like an object pool.... which is, strangely, almost exactly what C# uses.

CLR languages suffer the most in integer performance. In addition to that, system calls outside of managed code have to be marshalled. The rest of the performance hit comes from running the JIT compiler.
2007-06-02, 8:31 PM #25
Originally posted by Jon`C:
The rest of the performance hit comes from running the JIT compiler.

You can do AOT compilation with C# or any .NET language, too. But sometimes it's not as fast as JIT compiled.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-02, 10:26 PM #26
Originally posted by West Wind:
That said, Jon'C is right, you really need to just learn the programming mentality. The very fact that you had to ask "how do I learn a Programming Language" indicates that your not yet thinking the right way. So do yourself a BIG favor, start small, I mean REALLY small. If you've never even written a standalone commandline program then how do you plan on tackling a full game engine?


There's no "fact" about what you claim I asked. I never asked how to learn it, I asked which way would be best to learn it and which I would get the most out of (e.g. reading online tutorials and lessons or buying a book and reading through that).

If you had read my original post, you would have seen that I said that I had already made a few standalone programs. And what part of "Which is why I'm looking into learning, so I can build up enough to be able to start into game programming, but game programming isn't the only reason I'm looking to learn a new language. Granted I do want to study to be a game programmer, but I want to start small first." means that I want to tackle a full game engine, as you said? I already said I know I have to start small and learn the basics first. I'd appreciate it in the future if you wouldn't insult my intelligence.
2007-06-02, 10:33 PM #27
You're hostile. What they're saying is that learning C++ so you can work with a game engine is still too big. C# is better for noobs to most programming, particularly Game programming. That's ALL they're saying.
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2007-06-02, 10:52 PM #28
I already said that I've decided to go with C# instead of C++ because of what was said in the beginning of this thread. I also said that the 3d engine was a reason to start learning, but not the only reason I want to learn.

Anyway, I was correcting his wrong assumptions about my post. I never asked how to learn a programming language like West Wind said I did. I asked which way was is most beneficial. Asking how to learn something is rather backwards because by asking that, you've learned how to.... learn :confused:. It's insulting to me to say that I asked how to learn.
2007-06-03, 12:04 PM #29
Originally posted by Stormtrooper:
I'd appreciate it in the future if you wouldn't insult my intelligence.


I apologize.

I honestly did not mean to insult you intelligence. To answer you question on what way to best learn a language and get the most out of it, I still have to refer to the programmer's mentality. You best learn language by using it, and you get the most out of it by trying to use it for tasks well suited to the language. I've bought books, read tutorials, asked friends, but without question the BEST way to learn a language is to simply bang your head against it for a while, and when you get stuck, use an online language reference or look at someone else’s code that does the same thing.

As for the standalone program part, this comes back to a debate I had last night as to the nature of Javascript. When I first used javascript (which was very limited and way back in 2002) I was utterly unimpressed with the language, and nothing I had seen written in Javascript at the time could qualify as "good programming". Last night I was talking with a friend who was discussing how javascript has recently "come into it's own as a real programming language". So maybe you Standalone javascript programs do count for something, but the way I still see it is that javascrpit doesn’t count for a pile of beans when it comes to experience. (but please prove me wrong)

My recommendation still stands:
Download Python
Download Pyscripter (a great Python IDE)
Read the official Python Tutorial
Finally try out PyGame

P.S.: Jon'C. Your forgetting the most important thing about C and C++: Even though the languages are both broken, ugly, and poorly suited for many programming tasks, Almost Every Line Of Modern Systems Code Ever Written Was In C or C++! This body of code alone makes C and C++ an important language, and one that is eminently suited to a large number of very significant programming tasks. In my book that makes it a good language. (But I still say Stay the hell away from C or C++ if your not working on systems level work)
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2007-06-03, 1:26 PM #30
Originally posted by West Wind:
This body of code alone makes C and C++ an important language, and one that is eminently suited to a large number of very significant programming tasks. In my book that makes it a good language.

No one said it wasn't important. And just because it's widely used does not make it good. E.g. Perl. :suicide:
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-03, 2:00 PM #31
Originally posted by West Wind:
P.S.: Jon'C. Your forgetting the most important thing about C and C++: Even though the languages are both broken, ugly, and poorly suited for many programming tasks, Almost Every Line Of Modern Systems Code Ever Written Was In C or C++!
Next technology Microsoft operating systems are going to be written in native-compiled managed code (C#). Yes, even the kernel. Even future .NET Frameworks are going to be bootstrapped in native C#.

...this argument is a poor one for another reason too, though. C++ isn't automatically a good language because it's commonly used. The overwhelming majority of all code ever written (by line count) is in pre-.NET VB. Is VB6 a good language? How about all of those FORTRAN and COBOL programs that are still in everyday use, for banking, science and - until recently - stock trading? Are FORTRAN and COBOL good languages? People make lousy choices.

Being commonly used doesn't make them good. Being commonly-used does mean it's wise to learn C++ at some point. It's a great idea to learn Assembly too, even though you'll almost never use it or want to use it.

The main reason C# is a better language, actually, is due to economics: C# code, for an equal time investment, is invariably more reliable and more secure. The fact that the largest software company in the world is getting as hot and bothered over their own technology as SAJN gets when he looks in a mirror should tell you something. The Visual Studio guys are smart - a lot smarter, individually, than all of the people on this forum put together - and more of their code is managed than ever. Hell, even the Visual C++ compiler is managed code now. C++ is even dying as a systems programming language.

Edit: Oh, and C++ has never been used for systems code that much. All of the GNU codebase, Linux, BSD, Windows, Mach kernel and Darwin userland... it's all C. Just plain old C. Writing bare metal code in C++ is annoying as **** and not really worth the time at all.
2007-06-03, 3:13 PM #32
Actually, West Wind, I was a little more pissed off after work last night than I originally thought; I mis-read your post and attacked you for it. Looking back, I don't see what I was so mad about. I apologize for what I said, I have no idea what caused me to fly off the handle like that.

What I meant by standalone programs was in C++ (and more recently, C#), by following tutorials and "banging my head against it" I was able to make some basic programs (like math and whatnot). I'm more looking for some sort of reference that will give me more information about how the language works and how to achieve certain results (the tutorials or books). The thing is, you can't jump into it without knowing the bare-bones basics of it, that's why I wanted the tutorials or book recommendations, so I can build from the extreme basics and learn that way.
2007-06-03, 5:57 PM #33
Sounds like you might be looking for the equivalent of a Systems Programming Course. That certainly might give you the "bare bones" understanding of what sort of going on between the High-Level Langue and the actual OS. There are a number so call "Unix Systems Programming" books free online, but I have no idea if any of them are any good, and I don't know any Hard Cover books to recommend either.

On the topics of Books though, The K&R C book is legendary, but obviously it focuses on C and not C++. There is also the Thinking In C++ book (free online) which always gets High Marks (the same author also has a Thinking In Python Book (also Free) ;) ). Finally, there is cplusplus.com which has a pretty OK language reference. Take all this with a grain of salt though. I never actually read the K&R book or “Thinking in C++” (I did read "Thinking in Python" though), so I don't know if they are that useful.

Ok, now for the Side Debate:

Let me get this out there:
C++ is a BAD language.
There are very few remaining tasks, where, given no language limitations C++ would be the Right Choice to work in.
There are however a nearly endless real world situations where C++ is simply the best tool for the job, and that makes it a good tool. Not because it's the best, the most elegant, or even the most correct, but because it is the most useful.

I have seen important projects go down the drain because someone did not want to work in C++ even though the situation called for it. (I have also seen programmers demand to do a job in C++ even though the situation did not call for it and it would have been much easier to use a different language.)

The thing is, C++ is a complete, mature language with a correspondingly complete and mature Standard Library (which is also inconsistent, poorly documented at best, and generally a pain in the *** to use), and there is so much code out there that either uses C++ or is specifically designed to interface with C++ that discounting C++ just because it is a BAD language is also, BAD.

To quote a friend: "C++ isn't wrong, it's just... Quirky", you just have to learn to see it’s good sides, and know that it’s a very useful tool in your programming toolbelt. Hopefully in time there will be something to replace C and C++, but forgive me if I don’t take any bets on it being C# or D or any of these new languages. They are good languages, no argument, but that’s just not enough to replace C++.
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2007-06-03, 6:57 PM #34
Originally posted by West Wind:
but forgive me if I don’t take any bets on it being C# or D or any of these new languages. They are good languages, no argument, but that’s just not enough to replace C++.

Oh it's enough. They just need more time.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-04, 12:49 AM #35
If you decide to discard all this silly advice and learn C++ after all, I would recommend starting with C++ How to Program:

http://www.deitel.com/books/cppHTP4/index.html

The nice thing about learning C or C++ before all those fancy, windows-only, and vista-only, or download-an-update-which-nobody-on-xp-even-did-only, is that you have a chance to learn the way it's been done for years and decide for yourself whether it's as awful as people here are saying. They list all the good things about C# and all the bad things about C++ but don't give you the rest of the story.

C++ is fast.
C++ can be portable.
A large number of really cool open-source programs are written in C++.
You can get any number of free IDEs with no restrictions for C++.

C# locks you into windows, more specifically, DOT.NET, which comes preinstalled on VISTA only, with XP, you have to download it separately, which a lot of people haven't done.
C# locks you into the microsoft platform. Forever.
There are nowhere near the number of open-source C# programs, so it can be harder to find examples and resources to learn from.
C# is a lot like Java.

If you really, really want to LEARN how to program, and practice, and get good at it, and spend the time it takes to do it, I don't believe you can go wrong with any language, as long as you do some research and make an educated decision (I don't think a thread on Massassi counts as "educated").

Regarding 3d engines and games, I personally lack the math knowledge required to really do anything other than the very basics. JonC spent a number of hours discussing these things with me and I appreciated it. You may decide to pick the language based on who is willing to help you when you get stuck and what they know ;)
2007-06-04, 1:08 AM #36
I wish I understood half of what this thread was about.



No wait, I don't.
2007-06-04, 1:10 AM #37
Originally posted by Brian:
C++ is fast.
C++ can be portable.
A large number of really cool open-source programs are written in C++.
You can get any number of free IDEs with no restrictions for C++.

These all apply to C# as well.

Originally posted by Brian:
C# locks you into windows

No it doesn't. Mono is a third party .NET implementation for many platforms. It's no kiddy open source project, either, it's backed by Novell. Most of .NET 2.0 is implemented. It's actually the best platform for application development on Linux.

Microsoft has their own cross-platform implementation that they are working on as well. The CLR was designed from the ground up to be cross platform.

Originally posted by Brian:
more specifically, DOT.NET, which comes preinstalled on VISTA only, with XP, you have to download it separately, which a lot of people haven't done.

Yeah, but it's on Windows update, and you can redistribute it with your solution as well, and have it automatically install.

Originally posted by Brian:
C# locks you into the microsoft platform. Forever.

C# is an ECMA standard with two mature implementations at the moment (Mono and .NET). Mono runs on like a dozen platforms, how is developing for Linux with C# being locked into the Microsoft platform?

Originally posted by Brian:
There are nowhere near the number of open-source C# programs, so it can be harder to find examples and resources to learn from.

Hahaha. Of course there aren't as many C# applications, it hasn't been around that long. And there is an unbelievable amount of learning material out there for C#, most of which is far better written than comparable, neckbeard-written material for C++.

Originally posted by Brian:
C# is a lot like Java.

So? Java is an excellent language. It's not even slow anymore thanks to JIT compilation (although not as fast as .NET) I don't think the Java platform is very good (mainly because of the VM) but developing Java with a native target is not bad at all.

Originally posted by Brian:
(I don't think a thread on Massassi counts as "educated").

It is "educated" in that there are a number of very smart, experienced, qualified and educated people posting advice in this thread. You are not one of them.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2007-06-04, 2:51 AM #38
As Emon said, Mono is actually a really good implementation of .NET. SharpDevelop/MonoDevelop uses the exact same technologies that are used in Visual Studio (CodeDOM and System.ComponentModel). The Tao Framework includes bindings for OpenGL, GLUT, OpenAL, Cg, SDL, ODE and others (and recently they've been working on Tao.Xna (!))

And as Emon also said, Mono is the best way to make a Linux GUI app.
2007-06-04, 6:12 AM #39
Ok, I know this is Flaimbait, but I want to say it anyway:

There is only one Compiler, and its name is GCC.

Now, before anyone tries to correct me, let me explain. I know that there are MANY good compilers out there, some of which even outperform and are more standards compliant that GCC (also, gcc is a COLLECTION of compilers, but stick with me here). Bu the fact of the matter is, if you really want to call yourself a programmer (And Stormtrooper, I don't know if you do), you will be expected to be 100% familiar with GCC, GDB, CVS/SVN/Source Control, Makefiles, and Pre-Processors Macros. To put it quite simply, these are the standard tools of the trade, and no matter what language or platform you are working on, what you learn working with them will be invaluable.

I know C# has Pre-Processor Macros, and there is no reason why you can't slug together a Makefile for C# and shove it into a CVS repository, but right now I don't know of any standard toolchains for building C# code in GCC and debugging it with GDB. If you want to learn not just to program, but to be a programmer, it might behoove you to go learn in the standard Unix programming environment, and that pretty much means C and C++.

Don't Use Unix/Linux, don't worry, you don't have to.
Cygwin has everything you could need to learn to program the "Good Old Fashion Way". Plus you can still use Windows Based IDE's (such as Bloodshed Dev C++) to write you code before you compile it under cygwin.

Of course if you don't have the time or desire to become an Old School style Programmer, then you could to worse than C# (but also IMHO, you could do better).
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2007-06-04, 6:53 AM #40
Originally posted by Brian:
If you decide to discard all this silly advice and learn C++ after all, I would recommend starting with C++ How to Program:

http://www.deitel.com/books/cppHTP4/index.html

I was always under the impression that Deitel makes really ****ty books.

I find that the C++ FAQ Lite (http://www.parashift.com/c++-faq-lite/) is good for answering a lot of questions about C++, though it assumes that you already understand the basics.
[This message has been edited. Deal with it.]
123

↑ Up to the top!