ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to learn the differences between C, C++, and C#. I'm not a purist so I want to study all three of them. But I want to know what they have in common and different, in case I need to transpose C to C# or C# to C++ ect.
You should find many articles about the strengths and differences of each language with a simple online search. For C-pound-sign, you may want to search the MS web pages as it was developed by them for use within dot-net environments.
C and C++ share a common heritage, the most notable differences being native support for the OOP paradign by C++, as well as its template support and libraries.
The best way to learn the differences, is to learn the basics of each then write your own example code projects in each, with attention to application features of interest to you.
I'd start at c then c++ since c++ also includes everything c does but vice versa is not true. I never messed with c# since that is a geared towards Windows.
C# is a language designed by Microsoft for its "dot-Net" platform and is specific to that. It was designed by the team which created Borland's Delphi compiler, after Microsoft gave them an offer they couldn't refuse . . .
I'm not a purist and my stance is that I don't care. That being mentally and internally. I have to accomplish the things I need to do, so whatever language and platform works for me.
I do a moderate amount of C# because we build an instrument where it needs a Windows based interface, and I long ago decided that I needed to use Microsoft's tools to create these applications, otherwise I'd be in trouble with some oddball non-compatibility issues.
C++ (Linux or other), and C# BOTH have standard C library functions. They also have other features, some of which I use, because of the platform. Most of which I don't bother with.
My only comment is that uSoft makes it so that it is hard to contend easily (not impossible, you just have to understand what you're doing) with straight binary as well as byte oriented information. For instance we send a ton of binary data in byte oriented protocols and the application needs to process that and present it properly. Their default modes are so "string" oriented, that this is a problem, until you surpass it once and then copy your project for every future next step you take.
While their ways to do threads, send signals, and take care of re-entrancy are vastly different, they have thought about it. Yes I prefer System-V programming, but if one does a GUI I typically use Visual Studio or Qt (for Linux) and get excellent results both visibly as well as performance.
Having said all that: Learn C, learn it good. You'll have no problems with C++, C#, Java, Python, or Objective-C, and probably many others.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.