Sign in to follow this  
Stormtrooper30

C# or C++?

Recommended Posts

Hey, Im trying to figure out if I should learn C# or C++. I plan on using the Microsoft Visual studio express for one of them, but I dont know which one to get. WHich one is easier? On its site, Microsoft's tutorials and such all seem to be geared toward C#. So I may gfet that one, but am I making a mistake?

Share this post


Link to post
Share on other sites
C# has less idiosyncracies than C++, and those it has are optional. Also, I tend to consider that VC# is superior to VC++ as an IDE, but that's only my opinion. If you are serious about being a programmer, you will end up learning both anyway, but unless your brain is wired in a very odd way, you will probably get things going much earlier with C# than with C++.

Share this post


Link to post
Share on other sites
For just producing results, C# is easier.

Syntax-wise, C++ is much more powerful. Doesn't mean it's faster or easier to write.

If you're just learning to program, or have limited software development experience, C# will be much mroe forgiving.

If you're planning for long term learning, then C++ is a language that is good to know, and know well. But it takes a while before you can produce competitive results.

Share this post


Link to post
Share on other sites
Thanks Promit, I saw that list of yours when I searched C#. I've been using Python for a year now, and I don't really like it. I want something that is easy to use and read. It sounds like C# is good for what I want. I'll eventually learn C++ in a year or two, I just wanted to know which to start with.

Will it be easy to transfer from C# to C++?
Also, does anyone know of any good books for Visual C#? Or are the Microsoft tutorials adequete?

Share this post


Link to post
Share on other sites
Quote:
Original post by Stormtrooper30
Will it be easy to transfer from C# to C++?
Also, does anyone know of any good books for Visual C#? Or are the Microsoft tutorials adequete?
Dunno. When I started, C# wasn't around, so I went the other way. And between VB and C++, I didn't really need any books to get started.

The stuff MS Press publishes is usually pretty good. If you can, I'd suggest you go to a book store and take a look at what's on the shelves, rather than just picking something off Amazon.

Share this post


Link to post
Share on other sites
Quote:
Original post by boldyman
Most languages are derevied from C and C++. So start at the beginning!

So first he should learn CPL, BCPL and C before diving into C and C++?

Share this post


Link to post
Share on other sites
If you're going to learn precisely one of C# or C++, I'd recommend C#.

Irrespective of opinions about the quality of Dev-C++, it doesn't support C#. So if you do opt for C#, you don't want to be using Dev-C++.

Quote:
Original post by DevFred
Quote:
Original post by boldyman
Most languages are derevied from C and C++. So start at the beginning!

So first he should learn CPL, BCPL and C before diving into C and C++?

CPL is all very well, but if you can't program an analytical engine, what use are you? Clearly, you should start at the beginning.

Share this post


Link to post
Share on other sites
Quote:
Original post by boldyman
Learn C and C++!!!
Most languages are derevied from C and C++. So start at the beginning!
After that all languages are just another language, easy to learn.

www.nextdawn.nl


Odd i found SML to be very different from C (its far better).

<personal opinion>
Avoid C , its a language that truly deserves to rest in peace never to be touched ever again (Except for work on platforms where there are no high quality compilers for other languages).
</personal opinion>

C++ is useful but it isn't the best language to use while learning programming concepts in my opinion. (Too much time spent wrestling with the language and too little time spent focusing on what really matters)

I would instead recomend these:
Pascal for procedural programming.
Java or C# for OOP
SML for Functional programming.

Im sure others will recomend other languages though.

Share this post


Link to post
Share on other sites
Second the opinion on C - with the saving grace being systems programming. Purely assembly language is horrible (although some is required), but you need to rewrite less of the C library than you do of C++ in a freestanding environment (or alternatively, more of C works out-the-box as it were, in a freestanding environment). I like C# so that would be my personal recommendation. One thing that C++ does have going for it is that its templates are vastly better than C# generics (which, if you want to have something like a generic Vector class, is a nightmare).

EDIT: Removed quote since Promit fixed it, as well as added some relevant body to the post.

Share this post


Link to post
Share on other sites
Thanks for all the opinions, I think Im going with C#.
I just realized how hard this is compared to python...
this in C#:
using System;

class PleaseSayYo
{
static void Main()
{
Console.WriteLine("Yo!");
Console.ReadLine();
}
}


equals this in Python:

print "Yo"


Wow... mabey Python was a better choice...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this