[DUPLICATE] In practice, what is the difference between C#, C++ and python. What are the reasons to choose one over another? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

[DUPLICATE] In practice, what is the difference between C#, C++ and python. What are the reasons to choose one over another?

I like python and everytime I find someone complaining about something that python can't do well, I find another post describing how to do it and get good performance. I am thinking of also learning C something but I can't really decide on which one I should have a go first. What are the real practical differences between these languages?

3rd Apr 2017, 7:39 PM
Ruth G
Ruth G - avatar
19 Answers
+ 26
Syntax is the main difference, Python is higher level than C++, but not necessarily higher than C#. C++ and C# have a stark contrast in the way they work. C++ is much closer to C, it's C's subset, and it has many qualities of both C and C#. But you have to do a lot of stuff yourself in C++ where as C# and Python do a lot of it for you. Python is a interpreted language for the most part while C# and C++ are both compiled. If you're thinking about learning C, I highly recommend it. Warning, you'll end up having to do almost everything from scratch. But it will teach you better Programming and you'll learn a lot of the under the hood stuff of Programming. I'm trying to teach C here on SoloLearn, you should check out my Teaching C codes. See if you like them. You can then make a better decision if you want to learn C or not from there, I'm sure of it.
4th Apr 2017, 1:07 PM
SoraKatadzuma
SoraKatadzuma - avatar
+ 16
Bare with me here; C is much closer to the metal. It corresponds closely with the underlying assembly language -- this means well written C runs very quickly, so for applications that are time intensive (I.e an operating system / nuclear power plant valve control) C is useful for squeezing out as much performance as possible. C++ is a different language than C, but most C programs compile in C++ (if you want examples of this breaking lookup IOCCC). For this reason C++ is useful because you have access to low level C and high level language construct, not to mention robust libraries and data structures. I have done some projects in C# and it's in the high level language category. it's useful for engineering software because it has a very large set of libraries, and in general is a bit easier to develop OOP style in. Python on the other hand is useful as well for a wide range of things, albeit not as useful for software engineering in some cases. The GIL prevents multi threading solutions to parallel processing system -- albeit Python does have multiprocessing which is like multithreading with more overhead. All in all you wouldnt want Python for time sensitive programs (the plane carrying an atom bomb or etc) because it has overhead. Like you said though it can still be very fast. For this reason Python is mostly used for research and areas were quick design and ease of use helps drive research forward. In a practical scenario I would imagine you would be expected to know multiple languages for software engineering. Sometimes you need the quick scripting of python. Other times you need different things. For science and math you will use mostly python/R.
4th Apr 2017, 2:44 PM
Keenen Cates
Keenen Cates - avatar
+ 8
@victory, it dungeonsandanime@gmail.com. Email me any time ^_^
4th Apr 2017, 3:44 PM
SoraKatadzuma
SoraKatadzuma - avatar
+ 4
All these languages general purpose. But I use these languages for: C# as a rule for Win .net. It's for hight level bisness logic when portability and performance not so important. C++ It's when portability and performance very important. Python - for quick problems solving, for system administration and WEB development.
4th Apr 2017, 8:12 PM
Semen Kuzmin
+ 4
I read all those coments and I have now a question : so why is blender write in Python?
10th Apr 2017, 11:18 AM
Moersy
Moersy - avatar
+ 3
C# is high level language. In C++, you can directly point to memory locations, unlike C#, where you can only point to the reference of memory address. Python is more dynamic than C#, which is more dynamic than C++. Python is open source and platform independent but C# isn't. If you want to learn code fast, Python is way to go, but its actually very hard to build a robust program with python, as you can literally play around with how your code runs (dynamic) which could result in non scalable application. C# is more useful if you want to work as integrator or developer for web and GUI application. C++ is better if you want to build a core application or libraries that allow higher level language, C#, Java, JavaScript, and etc to use. Python is good if you want to build platform independent application.
6th Apr 2017, 9:05 AM
TaK
+ 1
use ++ to get hi speed and if you have enough time to write the code. if the speed is not your priority, use python.
5th Apr 2017, 3:59 PM
Andrey Taranov
+ 1
I tried C/C++ and found it a lot harder to understand then Python. Eventually I will get back to C, but for my current level Python seems just right. I don't plan to build software that critically relies on speed.
6th Apr 2017, 3:47 PM
Martin MAurer
Martin MAurer - avatar
+ 1
If you want programm driver for a device such as a DVD-Rom Drive you can't use Python and have to use C# or C++ or other low-level languages.
7th Apr 2017, 6:59 AM
Thecitybuilder93
+ 1
Comparing syntax is useless. If you think about the power of those languages (feature set) they are identical. Real difference is that C++ compiles to native binaries, programs in C# require .NET and Python has lowest performance and control over memory than both C++ and C#. Also, programs in Python require Python runtime installed on the user's machine and they are not native binaries.
7th Apr 2017, 8:46 PM
Марк Сафронов
Марк Сафронов - avatar
+ 1
Thank you all for the replies. I think that for my current needs, speed is not crucial. I am very interested in having the tools for data analysis for scientific research and I really like the ability to interact with the data on the spot without having to compile. I'm also more convinced that python is growing fast and many of the issues that I heard of or had to deal with myself can be worked out using the correct python tools. I have decided that for now I am going to focus on improving my python skills, including tools like django, aiming on becoming proficient. I'll definitely have a go at some flavour of C... after I improve on python. All your answers helped. Cheers!
9th May 2017, 10:53 AM
Ruth G
Ruth G - avatar
0
python is sexier
7th Apr 2017, 7:19 PM
jvoljvolizka
jvoljvolizka - avatar
- 1
i dont know. good question:D
6th Apr 2017, 1:43 PM
Julie
Julie - avatar
- 1
different father
8th Apr 2017, 1:11 AM
Mr PlaneJun
Mr PlaneJun - avatar
- 1
up
8th Apr 2017, 6:05 PM
Akram Aissaoui
Akram Aissaoui - avatar
- 2
I don't know
8th Apr 2017, 5:24 AM
наира
- 3
i think it depend what do you want to do
4th Apr 2017, 6:09 PM
Andrey Nazarov
Andrey Nazarov - avatar
- 3
love paerents
8th Apr 2017, 5:23 AM
наира
- 5
hello @sorakatadzuma please can I have ur personal email I would love to send a mail
4th Apr 2017, 2:29 PM
victory
victory - avatar