+ 5
2 questions
1. Is Python more powerful than C++? 2. What does the C in C++ stand for? (Just some questions that popped in my head after reading an answer that seemed highly incorrect to me)
24 Antworten
+ 7
1. Python is easier for beginners. Python can make a lot of things by writing less line of codes. Thus, it is more popular now.
2. C in C++? Cin= console in. Cout= Console out
+ 6
If you comfortable with C++ you can adopt python very fast. If you python developer it is hard to adopt c++.
+ 6
There's no doubt Python is slower than C++, or any programming language on Sololearn for that matter. But like I said, if you don't know what you're doing, you might get results faster using the built-in or library functions on Python. As a demonstration of what I am trying to say, here's a Python code that computes the factorial of 50,000 and print its first 100 digits:
import math
print(str(math.factorial(50000))[:100])
Now if you try to do this in any other language available in Code Playground, you'd either get overflow issues, or it'd take quite a while (or you're REALLY good at this stuff).
+ 6
"2 questions"
2 questions that should've been asked in your feed (yeah feed your feed a bit!) because of its broad and open-ended/opinion-based nature.
Opinion-based/open-ended discussions always go to the user's feed section because there's no fact, reference, or specific expertise for the topic.
+ 5
1. I don't know about powerful. C++ probably allows for more control more easily. Python is convenient to use, and hence popular. If you really know what you are doing, C++ codes can be made more efficient than Python ones.
2. If you are asking about the C in its name, it just refers to the C language. The ++ being the post-increment operator, C++ was thought of as the "new C". You can check out the etymology here:
https://en.wikipedia.org/wiki/C%2B%2B#Etymology
+ 4
You are absolutely free to do your research/survey, but as long as to do it in the right place that the guideline has been stated — which is user's feed section. I guess you're reasonable and mature enough to understand that.
* Post general discussions and open-ended questions in your feed.
+ 3
1. I asked if it was more powerful, not more popular, Muhd Khairul Amirin Bin Yaacob. Lol
And 2. Kishalaya Saha, That confirms what I thought. Somebody said it stands for classes.
Here's the answer I was telling you about:
The question was asking where c++ is used in real life.
"Hi There,
C++ is one language that changed the world of programming. I love it so much.
It's a kind of old now and not that powerful as Python
But if you want to learn concepts of programming it's the best choice. It is the language that originated a lot of concepts.
Even it's name has a meaning
"C" stands for Classes
Features like classes ,template , overloading ,inheritance are some examples
Afterall C++ is the first language that implemented OOP properly
Now Imagine a Program without Classes . It will be terrible.
It's worth learning it because it's easy and covers every concept that *exist* and create a strong base in concepts .."
+ 3
Strange... I just answered a similar question posted by someone else about the same time as this one.
Here's an article, I connected with, exploring possible theories of why Python is slow friggin slow. 😜
https://hackernoon.com/why-is-python-so-slow-e5074b6fe55b
+ 3
Daniel Cooper Here is the other question. You and this other guy must be on the same wave length. 😉
Granted... these are asked slightly different.
https://www.sololearn.com/Discuss/1607933/?ref=app
+ 3
Kishalaya Saha There are many unknown factors that could affect the performance of any remote execution on the SL Code Playground, least of which has much to do about language optimizations.
That said, it would be interesting to see the performance differences on other online REPL sites as well as local desktop execution across different languages.
+ 3
David Carroll I think it's well documented that Python is slower.
I said Code Playground languages because I thought most of them don't allow really big integers and factorial() as a library function. Though now Google tells me Java has BigInteger, and JS might have something similar too.
My basic point was, if I try to implement multiplication of big integers and the factorial function by hand, I won't be able to beat Python's speed--online or on a desktop.
+ 3
"Is Python more powerful than C++?"
So do you think any book has been written so far for the above topic or any Wiki page is available to compare them based on fact and figures or any systematic experiment has been done by a known organization to summarize all possible factors by which a developer can determine which one is powerful?
What's the definition of "opinion-based" for you, then?!
+ 3
Daniel Cooper "Is steel heavier than feathers?" Not if you compare a kilogram of each! 🤔
Excuse that old joke. When comparing languages you can nearly always accomplish the same tasks in each. One language might take more code than another. Choose the language according to the requirements of the task.
+ 3
Python will save you time on the writing of your code.
C will save you runtime on the execution of your code.
Prototype in python, then implement in C, is how you might use both their strengths.
+ 3
Genghis Thank you. I'll make sure to use that advice
+ 2
Before that misinformation spreads too far about the letter C in C++ standing for something, let me correct it here. The base language, C, was simply the next language developed from the B language. (B was a shortened nickname for BCPL). As the C language author, Dennis Ritchie, explained many times, C comes after B.
Although C++ had a temporary working name of "C with classes", the C did not mean Classes. The C is simple acknowledgement of the original language that Bjarn Stroustrup extended in C++.
+ 2
C++ Soldier (Babak) Neither of these 2 questions are in any way "opinion based" and are both on topic programming questions.
I like that name tho. Lol
+ 1
Python is good for working with data It usually takes one or two lines of code to do some basic calculations for which you would write at least 10 lines in c/c++.
c/c++ is the fastest (usable) language. It is good for addressing and handling data flows (pointers). Other languages hide pointers and do pointers work internally. so you can only assume where the data is going/coming from which is not so good if you are working with large application.
+ 1
David Carroll What question? Can you post it?
+ 1
1. Python is slow but more convenient to use. But c++ is quicker and more efficient (hence more powerful). Infact some major libraries in Python such as numpy even use C and C++ implementation to speed up things. Python is slow because it is an interpreted language. Hence everytime you run the code, the code would be converted to machine level code every time line by line or block by block whereas in compiled languages such as C++, you compile it once and only run the machine level compiled code which is quicker to execute.
2. C in C++ has no full form if you are looking for one.