Hello.
I am a c++ programmer and I want to learn python.
Which one is better (c++ or python) ?
What's difference between them ?
Which is easier to learn till becoming expert ?
Thanks :)
I get the feeling that Python is the easier of the two languages to learn and to code smaller programs in, however it's invariably going to be slower, and possibly less intuitive harder to use efficiently for larger projects (though I have attempted so far not one large project in Python).
I said "use efficiently", and made no reference to the efficiency of the programs generated, unless you meant that you don't think Python is a language in which one can write efficiently?
Obviously. You can't write efficiently in an inefficient language (but, paradoxically, you can write inefficiently in any language). What I mean is, you can only optimize so much before you hit the limits imposed by the execution environment. For example, in C you might get rid of floating point operations inside a fast loop by using fixed point arithmetic. In Python, that optimization would make no sense because ultimately the real bottleneck is the environment. In Python, optimizations revolve around algorithms (e.g. use quick sort instead of bubble sort, or simply a map) and delegation (instead of writing your own "optimized" implementation of whatever that would be interpreted at run time, use the one the language provides, which will be native code). When you need to write something fast for which there isn't an implementation, you'll just write it in C and call it from Python.
Hmm... obviously we don't translate the expression "to write efficiently" in reference to a programming language the same way. I meant efficiently in terms of the development speed of a program (which you mentioned by mentioning Python's optimization for rapid development), while you meant efficiently in terms of the execution time of the program. I'll note that.
Aside from that misunderstanding, we seem to be on the same page.
Oh, I see it now. I held on to the second usage of "efficiently": "write efficiently [in it]". The first usage, "use [it] efficiently", can indeed be interpreted as development speed.
I just learned a little.
it is very tumultuous. C++ is very ordered.
I even don't know how it's programs start !!!
there is no even variable declaration !!!