C# vs C++ I need to know!

Started by
44 comments, last by Kylotan 18 years, 10 months ago
Quote:Original post by whitin
Quote:Original post by Ikana
I don't know how old you are, or any other circumstances about your situation, but you say that you are getting discouraged, and so I can share my own experiences, hoping that they will help you.

I started programming when I was about 12. My first language was qbasic. After a couple of months of that, I decided to jump right into C++. It really wasn't an informed decision, and I really didn't understand that it would be hard. The only resource I had to learn from was one of those "Learn C++ in 21 days" books. I quickly got discouraged, believing that I was too stupid to be a programmer, and quit programming for years. What I did not understand was that programming is hard. It takes years to become good at. It takes patience, hard work, and perseverence. If you are interested in being a programmer, don't make the mistake of quitting just because it's hard. Quit because you don't enjoy it, or you aren't interested in programming, but not because it's hard. I found out years after I quit that I *do* want to be a programmer after all. I cringe every time I think about how talented I would be if I had just persevered. Don't make that mistake.


Sorry, you seemed to just look at the word discouraged and programming. I mean that I am getting discourage in learning C++ instead of C#. Mainly because I am only 15, just going into 10th, and C++ may not be the standard for game programming by the time I get out of highschool. I was wondering if I should just learn C# now or C++.



Whether C++ will be the most commonly used when you're out of highschool or not is really quite irrelevant. The reason is that the job of a programmer is not to excell in the "industry standard" language, but to be able to adapt quickly and efficiently to new languages.

Remember, you're not a "C++ programmer", but a "programmer".

And besides, it's unlikely you'll be getting a programming job right out of highschool. Chances are you'll have to get a degree in computer science or an equivalent. So you've probably got about seven years to go until you can start working. And in seven years so many things will have changed it's best not to worry about it at all, and just learn what you can.

<edit>
To stay on topic, I recommend C++ over C# for several reasons, none of which are speed. First, it's multi-paradigm and doesn't force OOP, which can be mind-bending to beginners.

Second, it exposes the programmer to things such as memory management, which you're protected from in garbage-collected languages like C#. This is good because you have no guarantee you'll be working with a garbage collected language when you get a real job. In the case you aren't, and you never learned how to cope with memory problems, your pretty much out of luck.

Third, there's a lot of good third-party game development libraries for beginners out there already for C++, most notably ClanLib and SDL.
</edit>
Advertisement
Quote:Original post by GroZZleR
Learn C++ to learn programming concepts, then switch to whatever language you want.


ever heard the quote "C++: an octopus made by nailing extra legs onto a dog" ?
i really have no intention to start some flamewar, but after all it's quite noticable that C++ is made by extending a non-OO language. plus, the standard lib is powerfull but used way to conservative, not to talk of the template mechanism in general.
C++ has great support for everything and it's the widely used industry standard (for games). but heck, it's by no means a beautiful language with a clear, consistent design.
and therefore i don't consider it a good start for a beginner. alternatives like java or C# will do pretty much anything e beginner might want during the first years. when you come to the point where you really need more, you should be good enough to easily adopt C++ anyways. but until then your life would be a lot happier...
of course you can start with C++. but it's simply suboptimal imho.
------------------------------------------------------------Jawohl, Herr Oberst!
Undoubtely, C++

Best performance, but hard to control and learn. Anyways, C++ is standard, while C# is M$ only...
You should learn whichever modern, full featured language has the most learning resources [books, classes, mentors, tutorial sites...] available to you. As others have mentioned, once you learn a bit about computer science the language you program in becomes largely immaterial. Learning syntax is easy. Learning how to write software is hard.
Quote:Original post by cyansoft
Here's the most important thing any programmer (games or otherwise) needs to know and understand:

*** You must be willing to learn new languages, methodologies, and techniques throughout your career (professional or hobby-wise). ***


Exactly, which you can also see in my journal post on the issue of languages

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.

Quote:Original post by Genjix

C# is not as cross platform as C++




no, C# is not as cross-platform 'straight out of the box', but with mongo(see previous posts) it is better than M$ only.

Quote:Original post by Genjix

python, lisp and java are much better than C#




This is a completely opinionated statement, there are no set values that make any of these languages 'better' than C#. I'll explain to you the differences in these languages:
Python is and interpreted language(it's not 'compiled' in the tradional sense), which has a weird syntax, but I like it. It's not as fast as C# or C++. www.python.org for more info.

Lisp I don't really know much about it. Google it.

Java is mostly web-based development, from what i've seen of it.

Me personally, I'm only 14, but I know C#, C++, VB, and Python. It's pretty easy to learn a new language after your initial one, it's mostly just changes in syntax, and maybe some different features, but usually nothing seriously huge. I started with C++ when i was about 10, but got halfway through a book, and just about quit, I decided to learn C#, it was far easier, and the mechanics of it are remarkably similar to C++. Just choose what you will, based on the information in all of these posts.



"All I want to know is who the man is that looked at a cow and said "I think I'll drink whatever comes out of those things when I squeeze them."Calvin and Hobbes
Quote:Original post by Spoonbender
Personally I'd say C is a waste of time. It teaches you nothing you wouldn't also learn with C++, while at the same time hindering you because it lacks some very convenient features. It's no easier to learn than C++, but a lot less useful. ;)

But I still think the only possible answer is "It doesn't make the least difference, no matter what people tell you".

What you're learning is programming, not C++ or C# in particular.
Once you know programming, learning either of those languages is a piece of cake. (The same goes for C, if you feel like learning that. But unlike C++ or C#, I don't really see any reason why C would be a good idea)

Well its those "convenient features" that hinder you from learning how to program. Starting out with C teaches you more about the workings of the computer, because it lacks allot of the higher level stuff in C++. Understanding properly how the computer works is, in my opinion, very important in understanding programming in a broader sense. Of course C is less useful and less productive than C++, but the goal of learning C is to learn. I'd even go as far as to say learning assembler first(as I did) is even more helpful in understanding the workings of the computer. If you learn Assembler, C, C++ then Java or C# you can see the progression form low-level to high-level. Having a more complete understanding such as this comes in handy when your high-level language isn’t doing what you want it to, you’ll have a better grip on what is going on under the surface and can come to a solution quicker.
Quote:Original post by Grain
Well its those "convenient features" that hinder you from learning how to program. Starting out with C teaches you more about the workings of the computer, because it lacks allot of the higher level stuff in C++.

No idea what you've been smoking... but can I have some? Could you please explain these features in C++ that hinder learning or 'learning more about the workings of the computer'?

I mean quite honestly if you want to know about the detailed workings of the computer you should be using ASM and not a high level language like C right?
Quote:Original post by Grain
Quote:Original post by Spoonbender
Personally I'd say C is a waste of time. It teaches you nothing you wouldn't also learn with C++, while at the same time hindering you because it lacks some very convenient features. It's no easier to learn than C++, but a lot less useful. ;)

But I still think the only possible answer is "It doesn't make the least difference, no matter what people tell you".

What you're learning is programming, not C++ or C# in particular.
Once you know programming, learning either of those languages is a piece of cake. (The same goes for C, if you feel like learning that. But unlike C++ or C#, I don't really see any reason why C would be a good idea)

Well its those "convenient features" that hinder you from learning how to program. Starting out with C teaches you more about the workings of the computer, because it lacks allot of the higher level stuff in C++. Understanding properly how the computer works is, in my opinion, very important in understanding programming in a broader sense. Of course C is less useful and less productive than C++, but the goal of learning C is to learn. I'd even go as far as to say learning assembler first(as I did) is even more helpful in understanding the workings of the computer. If you learn Assembler, C, C++ then Java or C# you can see the progression form low-level to high-level. Having a more complete understanding such as this comes in handy when your high-level language isn’t doing what you want it to, you’ll have a better grip on what is going on under the surface and can come to a solution quicker.


Exactly...
Well, both have strengths and weaknesses. If you just want to develop applications fast on a Windows platform and dont mind that people that will use your app has to download a big framework from Microsoft, then C# is good.

But if you want to develop programs that work on Linux, Mac etc, then C# is not an option since it is Windows only atm. And as someone else said, if you aim for work in the games industry, then C++ is a must since most of the companies use it.

// Allmight
-------------------------------------------------Founder and DirectorAllSoft Studios

This topic is closed to new replies.

Advertisement