19 odpowiedzi
+ 9
- C/C++ have complete manual control over memory (this is what I meant by hardware).
Dynamic allocated memory (using new/malloc) have to be released manually (using free/delete).
If you don't you will have a leak which is memory that cannot be used until the program ends.
Python has a Garbage collection which allocates/deallocates memory automatically: great feature to prevent ressource leaks but ressource consumming and unpredictable.
- Raw speed in C/C++ is faster than Python because it is quite unsafe. No check before the access. For instance in Python if we do array [10] while array size is 2, it will throw an exception and/or some checks to protest access. These checks cost a little time.
I personally like these 2 languages for next reasons:
Python:
- easy to learn
- development speed
- many libraries
- memory management safety
C++:
- ressources control
- pointers
There is no best language, just choose the one which suits your needs.
+ 35
I highly recommend you to start with Python for the following reasons:
- Python is way easier to learn than C++, so it is more suitable for beginners
- Python makes you adopt good habits in programming, for example: the indentation is mandatory in Python, which improves readability of your code
+ 5
Hello AxeCodex("")
I know your situation and confusion. I was in the same position. Both languages are great but for new people, python is definitely the go-to option. It's easy to learn, has a wide variety of applications and it will help you understand c++ better if you'll decide in the future to start learning c++. So definitely start with python. 😉
Hope this has benefited you.
+ 5
BaselAl_hajeri['MBH'] thanks man ..i just start my journey in programming
+ 5
C++
+ 4
Good luck with your learning AxeCodex("") ,,,
Just keep it up.
+ 4
But c++ is faster.....I still code in Python though
+ 2
thanks for the answer and explaination about it..well you see i just begin my journey on coding i got a lot thing to learn so that why sometime i confuss which languange should i learn first
+ 2
AxeCodex("") don't worry about which one is better. Both are great languages. But I emphasise again that you should definitely start with python, since it's way easier and it will help you to think like a programmer. If you get familiar with python, you'll have an easier time transitioning to c++ than vice versa.
+ 2
Bien
+ 2
Start Java+Ruby, but 1stLearn C++ along with Javascript & Python.
🌼🍃🌼🤣🤣
+ 2
If you want to work in gamedev you must learn c++ else you want to work in web you must learn python
+ 2
If you want the full control (hardware and software) of your computer C/C++ are your best partners.
+ 2
Michaël Randrianarisona what did you mean by that actually? can you explain more? ...
+ 1
I prefer both ,but if you learn python firstly it will help you to learn c++ ,and if you learn c++firstly it will confuse you to learn python.
+ 1
And python is for beginners to make the programming easy for other things.
+ 1
Start With Python then go for Java. And after that C++ will be easy for you to learn
+ 1
python is by far the best language.... Ask sentdex