LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-23-2010, 11:16 AM   #1
Super TWiT
Member
 
Registered: Oct 2009
Location: Cyberville
Distribution: Debian
Posts: 132

Rep: Reputation: 16
C ++ vs C# For Opensource Developement


I really enjoy linux and the philosophy it has with it and someday want to contribute back to the community. I was wondering which language I should focus on learning C++ or C#. I have no experience in either of those languages. I really hate bloated software, and I have heard C++ performs better. (Things like fluxbox are programmed in it I believe) However, C# is supposed to be the thing of the future, and automatic garbage collection is a nice plus.

EDIT:
Found my answer C++ DEFINATELY. I have another thread dedicated to what material I should use.
Thanks for your help!

Last edited by Super TWiT; 03-28-2010 at 02:21 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-23-2010, 11:27 AM   #2
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
C# is a nice language (I like programming in it), and you can open source your code in any language. Mono would be your only real runtime choice outside of the MS world, however - and it tends to lag development by quite a bit.

C++ would be the better choice, though I must mention that GCC/G++ is a freaking mess. You'll end up making quite a few tweaks to optimize your code for the compiler rather than the other way around. You might want to try clang or some of the other ones.
 
Old 03-23-2010, 11:51 AM   #3
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Centos
Posts: 4,963

Rep: Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073
Quote:
Originally Posted by Super TWiT View Post
I was wondering which language I should focus on learning C++ or C#.
I think MS has a strong track record of trying to pervert standards to sabotage software development on non MS platforms. They tried and failed with C++ and I think the C++ standard is now far beyond their power to pervert that way. They tried, came a lot closer, but still failed with Java. That standard may also be beyond their control at this point.

I think C# exists for the original purpose of giving MS another shot at taking control of an important standard so they can pervert it later to the detriment of the rest of the software industry. I think they still are in control of future changes in the C# standard.

For any development on Linux, one advantage to C++ over C# is the lesser (not zero, unfortunately) influence of MS on the future directions of the language standard.

I also think C++ is a fundamentally better language than C#.

Quote:
I have heard C++ performs better.
When performance matters, C++ performs enormously better. The many comparisons "proving" the performance difference is smaller are distortions primarily based on examples where performance doesn't matter.

Quote:
automatic garbage collection is a nice plus.
Those are fighting words, meaning that once someone makes a serious comment agreeing or disagreeing with that statement, the thread tends to get taken over by an argument on that question and no-one ever convinces anyone. I disagree with your statement about automatic garbage collection, but I'd rather not have that fight again nor here.
 
3 members found this post helpful.
Old 03-23-2010, 12:14 PM   #4
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
C# is a great choice for Windows. And (with all apologies to Miguel de Icaza), Linux: not so much . In fact, Mono is pretty much "Bloatware Embodied".

Personally, I'd recommend C.

Or Java. Maybe Python or Perl. Or Lisp/Scheme, Ruby, Smalltalk/Squeak, OCaml, Erlang, or any of a zillion others.

But C# on Linux - sorry

IMHO... PSM
 
1 members found this post helpful.
Old 03-23-2010, 12:18 PM   #5
raconteur
Member
 
Registered: Dec 2007
Location: Slightly left of center
Distribution: slackware
Posts: 276
Blog Entries: 2

Rep: Reputation: 44
Stick with c++. I've been using c# for about a year now and though I have developed a proficiency, I haven't developed any fondness for the language or any of its attributes. I don't believe it will catch on outside of MS for many reasons. Indeed, I have one project that I've spent about a month on now (a fairly simple service that communicates with serial devices, a database, and a web-based configuration) in c# and I'm going to scrap that code and write it in c++. The aggravations are just too many and I've reached a point of diminishing return.
 
1 members found this post helpful.
Old 03-23-2010, 12:47 PM   #6
Super TWiT
Member
 
Registered: Oct 2009
Location: Cyberville
Distribution: Debian
Posts: 132

Original Poster
Rep: Reputation: 16
Yeah, I guess that answers my question. I was leaning towards c++ anyway, and have heard a lot about the lack of openess. I really don't want to get tied in to .net. I guess it really doesn't matter if it is "newer" because c++ is still going strong, and will be especially on non microsoft platforms. I had in my mind that c# would outmode C++, but C++ didn't outmode C. I am going c++ all the way. Any good gcc tutorials I should look at? I have how to think like a computer scientist c++ edition. It teaches generic c++ programming
 
1 members found this post helpful.
Old 03-23-2010, 02:40 PM   #7
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
Quote:
Originally Posted by Super TWiT View Post
Yeah, I guess that answers my question. I was leaning towards c++ anyway, and have heard a lot about the lack of openess. I really don't want to get tied in to .net. I guess it really doesn't matter if it is "newer" because c++ is still going strong, and will be especially on non microsoft platforms. I had in my mind that c# would outmode C++, but C++ didn't outmode C. I am going c++ all the way. Any good gcc tutorials I should look at? I have how to think like a computer scientist c++ edition. It teaches generic c++ programming
C# is definitely not outmoding C++. It's probably put a nice dent in VB, though.
 
Old 03-23-2010, 04:51 PM   #8
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Centos
Posts: 4,963

Rep: Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073
Quote:
Originally Posted by Super TWiT View Post
Any good gcc tutorials I should look at?
You want a C++ tutorial, not a gcc tutorial.

Especially for beginning C++ programming there isn't enough specific to gcc that you need to learn to even call that learning. There is a lot to learn about C++, but it is not specific to gcc.

In choosing your C++ tutorial, you will want to make sure you are selecting one that is not based on MFC nor .net nor Visual Studio.

You might want to select an IDE such as KDevelop or code::blocks. In that case, you would have an easier time with a C++ tutorial that is specific to the IDE you select.
 
Old 03-23-2010, 05:32 PM   #9
Super TWiT
Member
 
Registered: Oct 2009
Location: Cyberville
Distribution: Debian
Posts: 132

Original Poster
Rep: Reputation: 16
Yeah, I have how to think like a computer scientist: c++ edition, but it is generic. I was just wondering if there was anything more tailored to g++.
 
Old 03-23-2010, 06:44 PM   #10
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by Super TWiT View Post
Yeah, I have how to think like a computer scientist: c++ edition, but it is generic. I was just wondering if there was anything more tailored to g++.
Ironically, Microsoft C++ documentation/tutorials are good.

If/when you know C++ in general, you can read g++ documentation which explains g++ C++ dialect peculiarities.

And a lot of C++ nuisances have been successfully hidden from the programmer by 'boost' library - in a cross-platform way.
 
1 members found this post helpful.
Old 03-24-2010, 09:26 AM   #11
johnsfine
Senior Member
 
Registered: Dec 2007
Distribution: Centos
Posts: 4,963

Rep: Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073Reputation: 1073
Quote:
Originally Posted by Super TWiT View Post
I was just wondering if there was anything more tailored to g++.
My point was that "tailored to g++" isn't even a meaningful concept for a C++ tutorial.

There is nothing specific to g++ (other than the simple command to compile a program) that should be used or learned by a beginner.

You should be far more advanced in C++ programming before you have any interest in __attribute__ or any other features that are part of g++ but not part of generic C++.

This is in contrast to MS C++. A tutorial tailored to MS C++ would probably use MFC or .net or other MS specific features that wouldn't be available in generic C++.

A generic C++ tutorial shouldn't use MS specific features. That is all the tailoring to g++ you should want (simply not being tailored to MS).

As I said before, you might want to use an IDE. In that case it is very helpful to choose a tutorial tailored to that IDE. GCC is compatible with many different IDEs.

Also, you might want to write GUI and/or graphics programs early in the process of learning C++. If so, you should choose a GUI and/or graphics tool kit and choose a tutorial based on the tool kit.

MS C++ bundles all that in, so learning GUI or graphics with MS C++ probably means learning the MS specific GUI or graphics tools.

There is no GUI/graphics in generic C++ nor is there any GUI/graphics support specific to GCC. GCC is compatible with many different GUI/graphics tool kits.
 
Old 03-24-2010, 10:13 AM   #12
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
Seriously just start with a solid IDE and work the basic C, then C++ tutorials. Don't worry about advanced stuff at this point.

Once you need them you can start learning the compiler eccentricities for whatever platform
 
Old 03-24-2010, 03:50 PM   #13
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Quote:
Originally Posted by MBybee View Post
Seriously just start with a solid IDE and work the basic C, then C++ tutorials. Don't worry about advanced stuff at this point.

Once you need them you can start learning the compiler eccentricities for whatever platform
I would recommend the opposite - learn to do programming without an IDE. And, if you wish, without a debugger. These are sure ways to learn to first think and only then do.
 
Old 03-24-2010, 04:25 PM   #14
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
I'd go one further and suggest try to avoid IDEs at all cost, they promote a lot of really, really bad working habits and practices, and are way too resource intensive for what they are; a glorified text editor.

As for your main question; out of the two I'd recommend c++; it is more widely used in the community, and it isn't tied to one vendor; this allows for a much better language community. Much wider at the very least.

If I were to suggest another similar language, though, for my money it always has to be c. Its logically more sound (to me at least), it is a lot simpler than the others, it is quick, and it is fantastic to learn; you make a mistake, it is your mistake and no one elses.

It has also been a standard for what, 38 years?
 
1 members found this post helpful.
Old 03-25-2010, 12:49 AM   #15
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
Quote:
Originally Posted by jamescondron View Post
I'd go one further and suggest try to avoid IDEs at all cost, they promote a lot of really, really bad working habits and practices, and are way too resource intensive for what they are; a glorified text editor.

As for your main question; out of the two I'd recommend c++; it is more widely used in the community, and it isn't tied to one vendor; this allows for a much better language community. Much wider at the very least.

If I were to suggest another similar language, though, for my money it always has to be c. Its logically more sound (to me at least), it is a lot simpler than the others, it is quick, and it is fantastic to learn; you make a mistake, it is your mistake and no one elses.

It has also been a standard for what, 38 years?
Depends on what you consider an IDE

I consider Vim and Kate IDEs - not that Eclipse and Xcode don't serve a purpose ( I guess ).

The point is though, use something with syntax highlighting and you'll be on a good start. Something that uses fixed width fonts, especially.
 
  


Reply

Tags
programming language


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ developement in Linux tito2502 Programming 5 09-07-2006 03:17 AM
Need suggestions on what to use for web developement epod69 Linux - Software 3 05-03-2005 11:11 PM
Developement Tools For Linare RevJack Linare 3 09-07-2004 01:03 AM
Slackware 10 Developement Team - Thank You! Thank You! and Thank you! perry Slackware 5 07-21-2004 11:21 AM
C++ developement environments? rank_n00b Linux - Newbie 1 06-29-2004 04:37 AM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration