C# or C++

I’m really hesitating on which one to learn, C# is a Microsoft invention but Novell is doing good with Mono development so I’m still hesitating on which one to learn. I already started learning C++ but may change my mind when I hear your opinions.

Please also mention why you voted for that one and I appreciate a detailed response.

Thank you

If you just want to program for Linux then c++ is the best bet. However if you plan on getting a job programming then c3 is probably better especially in combination with M$ sharepoint as theres skills are an asset. At least here in Sweden where there are plenty of jobs despite the of the market.

/Geoff

If you go down the C# path and have any way of legally obtaining visual studio (no idea if there are trials out there) I highly recommend it above any other IDE, catch is that you’ll also need windows… as it doesn’t seem to run under wine.

And what about performance. Isn’t Mono/.NET a runtime, which means it’s slower than native code?

Btw, I voted for C++ so I can see the results immediately and since I started learning it.

Well, I should also say this: it’s mainly for cross-platform development so in case of C# I’d be programming for Mono so I’d probably be using MonoDevelop.

http://www.mono-project.com/files/6/65/Addin.png](Redirecting…)
But only if you have the option to use it for free it’s great, as I’m sure it’s quite costly if you actually have to purchase it.

It’s just that it’s a great application to work in… was rather dissapointed by monodevelop. Might also be cause I’ve only received guidance with visual studio that it is the only application I know how to make proper use of.

I was quite surprised to see Mono integration into a Microsoft product but I bet it’s an extra plugin you’ve installed?

I will have a look at Visual Studio but I doubt my interest because I mainly develop in Linux and use Windows just for hacking the result.

I’m an expert in C programming, which is really the basis of C++. My advice to anyone who wants to get really good at programming is to learn C. Some think you should learn Python first because it hides you from the underlying details.

However, C is small and compact, and you can get really good with it within a couple of years (if you have a natural talent).

Once you know C, you can easily pick up the object-oriented parts of C++, and quickly become adept in using the other features of the language.

It has to be said, that C++ is an absolute beast, and very difficult to master all aspects of the language. C ties very closely to the underlying hardware. It the lowest level programming language aside from machine code, and is great when you need performance, like in the linux kernel. 99.9% C code. Other small part is hand-written machine code.

A good C++ programmer, can learn C# quickly too, because the two languages a relatively similar. They differ in the details.

A tutor of mine once said, there are 2 types of people, those who can program, and those who can’t. That means, that if you can program, then it doesn’t matter what language it is. You’ll just have a knack for it!

All the best,
and enjoy, programming is about solving problems, not necessarily a language itself.

James rotfl!

Thank you for your detailed response.

The reason why I immediately chose for C++ is because of the LGPL license addition to Qt so it looks way more interesting, another advantage is their Qt creator application which focuses on C++ only. To be honest, the LGPL addition to Qt is the reason why I made my decision and go from web development to desktop application development.

As an expert in C, could you tell me what toolkit you use for cross-platform (if applicable) GUI development? GTK, Qt, WxWidgets or another? Please also explain your choice if possible.

Thank you

What James Walmelye said:

Some people can get quite uptight about this language vs that, but the only significant divide is between programming and scripting [and even that is blurring - c# is arguably scripting]. You can’t say learn one, you have learnt them all, but to do anything useful you have to find some flat ground near the top of glass mountain - and there are many routes to climb glass mountain.

The problem you want to solve and available resources will dictate the choice of language for the task, but learning is a separate task [not to say you can’t do anything useful while you learn]. The difference is that in the learning phase, your choices are limited by the route you have chosen to learn and you don’t necessarily have the experience to choose the learning route which gets you started soonest on the problemt you want to solve.

If you have a specific project in mind, a description might help people make better suggestions, to give you the best chance of doing your useful project as you learn. But otherwise, there is no best language.

QT Designer lets you draw things on the screen pretty fast at least (all I’ve done so far :P)

My first look at an IDE would probably be eclipse as it supports pretty much anything and I don’t like ‘relearning’ IDE’s.

In my opinion though gtk+ is cross platform the reality is deploying an application on windows that requires gtk+ is somewhat highly complex and as such I would recommend you stick with either Qt or WxWidgets. However note WxWidgets is mostly a Gui toolkit.

The most significant problem your going to have writing cross platform applications is to ensure you never use platform specific code or libraries.

This is where Qt can be really helpful because in addition to providing a cross platform gui toolkit it provides other toolkits like network, sql database etc…

As a side note for whatever reason I’m not very keen on QTCreator, I use the latest development versions of netbeans cnd as it has Qt support.

Not C# portability is pretty easy as well especially if you take a proper OO approach and separate UI from any other layer then you can just use macros to compile the proper ui for each platform.

The express version Visual Studio 2008 Express Edition Products
is free but won’t work with wine but you can use it in an windows vm

/Geoff

Thank you for the replies so far.

EarthMind wrote:
> ------------------------------------------------------------------------
> A poll associated with this post was created, to vote and see the
> results, please visit http://forums.opensuse.org/showthread.php?t=405817
> ------------------------------------------------------------------------
> Question: C# or C++, which one do you choose?
>
> - C#
> - C++

IMHO, learn C. Even C++ (with all of its C-isms) isn’t C.

The majority of programmers coming into the market right now have
NO experience because they’re SO far away from what is actually
happening when they code.

The big jobs will still be taken by those who know how to
program in assembler and C… even if we actually program in
C# or Java.

People who can’t manage their own memory do not deserve to
become programmers. It was a bad idea… and it’s still a bad
idea to rely on arbitrary garbage collection to make up for
poor programming ability.

Just my opinion…

LEARN HOW TO PROGRAM… then learn how to use a higher
level language.

On Wed, 25 Feb 2009 03:43:14 +0000, cjcox wrote:

> IMHO, learn C. Even C++ (with all of its C-isms) isn’t C.
>
> The majority of programmers coming into the market right now have NO
> experience because they’re SO far away from what is actually happening
> when they code.
>
> The big jobs will still be taken by those who know how to program in
> assembler and C… even if we actually program in C# or Java.
>
> People who can’t manage their own memory do not deserve to become
> programmers. It was a bad idea… and it’s still a bad idea to rely on
> arbitrary garbage collection to make up for poor programming ability.
>
> Just my opinion…
>
> LEARN HOW TO PROGRAM… then learn how to use a higher level language.

I’ve always said that the important thing to learn is structured
programming - control structures, conditionals, etc…after that, it’s
just syntax.

I’d expand that today to say that modern coders should learn the
principles of object-oriented languages as well, since that’s used in
larger projects.

I come at this from a perspective of no significant formal software
engineering training (I took a couple classes before I left college), but
from having written code in something like 18 languages over the past 20
years. Having learned “the Latin” of programming (ie, structured
programming) and approaching code from that standpoint means that I can
generally sit down and look at code in whatever language and figure out
what it’s doing and use that as a template for what I need to do.

Very handy for writing utilities to do very specific tasks…

Jim

That rant would include me. I’m learning the syntax and what-not (VB.NET, ASP.NET, ADO.NET) but I know there’s a lot I don’t know.