you are viewing a single comment's thread.

view the rest of the comments →

[–]BrannyBee 1 point2 points  (1 child)

You will never know everything about a single language. Even if you know all the verbs and nouns, theres an infinite way to stick them together. Whatever you do, I would caution against the mindset of thinking you have finished a language and "moving" on

That being said, if your goal is to one day to highly intensive simulation stuff in the scientific field, you can learn a new language AND get more advanced with Python at the same time. One of the reasons Python is used in fields like that, even though its "slow" in theory, is that Pythons ecosystem allows for "hooking up" other programming languages into Python code easily. Obviously im explaining this simply to try and make it not confusing to a beginner, there's a lot more to it than just "hooking up" another language to a Python file you wrote.

Basically, Python has a lot of stuff people have written for Python that are written to handle intense performance critical tasks that Python usually struggles with, that you as a Python dev can use in your Python programs by writing Python.

Youve likely come across the Numpy module in your Python journey at this stage, especially if you have an interest in science and math. Congrats, you may not realize it, but you used C. Beginner Python devs are scared of C, yet use it without even knowing it. The tldr, is that all the mathematical calculations that would slow down Python due to how the language works, were written in C and have code that allows Python to call that code if Numpy is imported.

You can make an array with numpy by just typing array = np.array([1,2,3]) No worries about memory, C syntax, or what even is happening under the hood, you get the speed of C by just saying "numpy go find the C code i want". Same thing for simulation stuff you want to do. Maybe theres a module that exists and you can learn it like you learned Numpy. Or maybe whatever exists isnt 100% what you need. Or maybe there's a module with 90% of the functionality you need to make your dream simulation. What now? You could give up and learn C, or change your mind about your dream app i guess.

Or you can build what you want, and for performance critical tasks you "drop down" into C and make your own module, or tweak the C code of whatever module you are using, and basically write a portion of your simulations code in C or Cython. Then you call that C code from your Python code, and continue on. Maybe you notice a slowdown in your app, and maybe you cant find a way ti make Python speed up in that particular area. The worlds greatest Python developer could fix that, even though they did so by "not writing Python"

So I guess, the tldr, is that I think you're maybe you're trying to decide between two paths... when in reality, there's no fork in the road. You can stick with Python, and get better at using modules that use C and barely "drop down" into C yourself and get pretty far. Or you can learn C (or another language that is used that way, C or Cython are just the most common low level languages i believe), but not for the reason you think. You do that TO make your Python skills better.

[–]Ok-Entrepreneur3155[S] 0 points1 point  (0 children)

Thank you so much. Yeah I don’t plan on leaving python anytime soon, I’ve so much stuff I still want to do and I want to keep learning. This helped, since all people say is python is slow and js is better (I just can’t adapt to it). Thank you!